Claim organization relation
Claim or confirm an organization relation using a connect token.
Path Parameters
External service ID (UUID).
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response
200Error Responses
invalid_schema
Request validation failed.
missing_api_token
No authentication token provided.
invalid_api_token
Invalid or expired authentication token.
scope_permission_denied
Insufficient permissions for this operation.
external_service_access_denied
Token does not match the requested external service.
organization_access_denied
Service is not granted access to the organization.
connect_token_not_found
Connect token was not found.
connect_token_unusable
Connect token is already claimed, cancelled, or consumed.
external_organization_id_mismatch
The target organization relation exists, but external organization IDs differ.
external_organization_id_already_in_use
The submitted external organization ID is already linked to a different organization relation.
expired_connect_token
Connect token has expired.
malformed_connect_token
Connect token format is invalid.
curl -X POST "https://dev.wingfield.systems/api/v1/external-services/497f6eca-6276-4993-bfeb-53cbbbba6f08/organization-relations/claim" \ -H "Content-Type: application/json" \ -d '{ "connectToken": "string", "externalOrganizationId": "string" }'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"externalServiceId": "e8623a0d-39de-4963-9c6c-a25dc38e89c9",
"organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
"externalOrganizationId": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}{
"error": {
"type": "invalid_schema",
"message": "string",
"issues": [
{}
]
}
}{
"error": {
"type": "missing_api_token",
"message": "string"
}
}{
"error": {
"type": "scope_permission_denied",
"message": "string"
}
}{
"error": {
"type": "connect_token_not_found",
"message": "string"
}
}{
"error": {
"type": "connect_token_unusable",
"message": "string"
}
}{
"error": {
"type": "expired_connect_token",
"message": "string"
}
}{
"error": {
"type": "malformed_connect_token",
"message": "string"
}
}List organizations for external service GET
Retrieve organizations linked to a specific external service.
Link user to organization or update subscription PUT
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.