Wingfield Logo
Wingfield Partner API
Organization

Link user to organization or update subscription

PUT
/api/v1/organizations/{organizationId}/users/{userId}/subscription

Link a user to an organization or update the user's subscription within that organization. If subscription is PRO, the relation is marked as externally managed.

Path Parameters

organizationId*string

Organization ID (UUID).

Formatuuid
userId*string

User ID (UUID).

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Error Responses

400

invalid_schema

Request validation failed.

401

missing_api_token

No authentication token provided.

401

invalid_api_token

Invalid or expired authentication token.

403

scope_permission_denied

Insufficient permissions for this operation.

403

organization_access_denied

Service is not granted access to the organization.

403

pro_user_quota_exceeded

Pro-user quota exceeded for this external service.

404

organization_not_found

Organization was not found.

404

user_not_found

User was not found.

500

internal_server_error

Unexpected server error.

curl -X PUT "https://dev.wingfield.systems/api/v1/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/users/497f6eca-6276-4993-bfeb-53cbbbba6f08/subscription" \  -H "Content-Type: application/json" \  -d '{    "subscription": "PRO"  }'
{}
{
  "error": {
    "type": "invalid_schema",
    "message": "string",
    "issues": [
      {}
    ]
  }
}
{
  "error": {
    "type": "missing_api_token",
    "message": "string"
  }
}
{
  "error": {
    "type": "scope_permission_denied",
    "message": "string"
  }
}
{
  "error": {
    "type": "organization_not_found",
    "message": "string"
  }
}
{
  "error": {
    "type": "internal_server_error",
    "message": "string"
  }
}