{"openapi":"3.1.0","info":{"title":"MyCLM API","version":"1.0","summary":"Electronic signature, registered mail, contacts, tasks and organization provisioning.","description":"The MyCLM API lets your software send documents for electronic signature and registered mail, manage contacts and tasks, and provision organizations for your own customers.\n\nNew here? Start with the [Quickstart](http://docs.localhost:5175/getting-started/quickstart/) and the [Authentication guide](http://docs.localhost:5175/getting-started/authentication/).\n\n- **Authentication**: OAuth 2 bearer tokens (10 minutes) issued by the identity provider of your workspace. API keys and partner applications (provisioning) use `client_credentials`; connected apps acting for a person use the authorization code flow (PKCE, `private_key_jwt`) started on the MyCLM consent page.\n- **Format**: JSON, UTF-8, ISO 8601 dates in UTC, UUID identifiers. Uploads are `multipart/form-data`.\n- **Lists**: `{ \"results\": [...], \"nextPageToken\": \"...\" }`. **Errors**: `{ \"error\": { \"code\", \"message\", \"details\" } }` with a stable `code`.\n- **Rate limits**: per client and per minute, advertised with the `RateLimit-*` headers; `429` with `Retry-After` when exceeded.\n- **Retries**: send an `Idempotency-Key` header on every `POST` and reuse it when retrying: the first response is answered again for 24 hours, never executed twice.\n- **Concurrent updates**: versioned resources expose `version` and an `ETag` (`W/\"<version>\"`); send it back in `If-Match` to update, `412 precondition_failed` means someone changed the resource meanwhile.","contact":{"name":"MyCLM developer support","url":"http://docs.localhost:5175/resources/support/"},"termsOfService":"http://docs.localhost:5175/resources/support/#terms-of-use"},"servers":[{"url":"https://api.myclm-dev.mylegitech.com","description":"This environment"},{"url":"https://api.mylegitech.com","description":"Production"}],"security":[{"bearerAuth":[]},{"clientCredentials":[]},{"authorizationCode":[]}],"tags":[{"name":"Identity","description":"Who the token represents, and where it can work."},{"name":"Signature requests","description":"Send PDF documents for electronic signature (eIDAS SES / AES / QES) and follow each signer."},{"name":"Registered mail","description":"Electronic registered mail (LRE): drafts, sending, tracking per recipient and legal proofs."},{"name":"Sender accounts","description":"Sender identities at the registered mail vendor, shared by an entity."},{"name":"Contacts","description":"Address book of persons and companies, per entity."},{"name":"Tasks","description":"Tasks and recurring tasks with reminders, assignees and linked contacts."},{"name":"Structure","description":"The organization tree: organization, entities and groups; and the roles."},{"name":"Members","description":"People attached to the nodes of an organization, with a role."},{"name":"Provisioning","description":"Partner applications: create organizations, nodes and members, idempotent by `externalId`."},{"name":"Connected apps","description":"Partner applications: organizations that approved the application (consent page); delegated tokens act for the people who authorized it."},{"name":"Webhooks","description":"Events sent to your HTTPS endpoints. Signed with HMAC-SHA256 (`X-MLT-Signature`)."}],"x-tagGroups":[{"name":"Account","tags":["Identity"]},{"name":"Documents & sending","tags":["Signature requests","Registered mail","Sender accounts"]},{"name":"Relationships & work","tags":["Contacts","Tasks"]},{"name":"Organization","tags":["Structure","Members"]},{"name":"Partner platform","tags":["Provisioning","Connected apps"]},{"name":"Events","tags":["Webhooks"]}],"paths":{"/v1/me":{"get":{"operationId":"getMe","tags":["Identity"],"summary":"Retrieve the current principal","description":"Returns who the token represents (a person, the service account of an API key, or the person a connected app acts for with a delegated token), the organizations and entities it can work in and the effective permissions. Call it first to find the `entityId` to create resources in.\n\n**Connected apps (delegated token):** the business scope consented by the user, within the rights of the user.","responses":{"200":{"description":"The current principal.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"},"example":{"user":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard","locale":"fr","avatarUrl":null,"welcomeCompletedAt":"2026-09-01T08:30:00.000Z"},"provider":{"id":"0192f3a1-7c2e-7b4d-9a61-100000000001","name":"MyCLM","slug":"mylegitech"},"orgs":[{"id":"0192f3a1-7c2e-7b4d-9a61-200000000001","name":"Cabinet Bernard Immobilier","permissions":[],"role":null,"features":["tasks","signature","registered_mail"],"admin":{"sections":[]},"parentId":null,"ancestorIds":[],"depth":1,"contractMode":"own","access":"direct","environment":"live","twinOrgId":null,"logoUrl":null}],"scopes":[{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","orgName":"Cabinet Bernard Immobilier","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","entityName":"Agence Lyon 6e","nodeId":"0192f3a1-7c2e-7b4d-9a61-200000000002","twinNodeId":null,"permissions":["members.read","tasks.use","signature.read","signature.send","registered_mail.read","registered_mail.send","contacts.read","contacts.write"],"features":["tasks","signature","registered_mail"],"role":{"id":"0192f3a1-7c2e-7b4d-9a61-320000000002","key":"member","name":"Member"}}],"memberships":[{"id":"0192f3a1-7c2e-7b4d-9a61-310000000001","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","orgName":"Cabinet Bernard Immobilier","node":{"id":"0192f3a1-7c2e-7b4d-9a61-200000000002","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","type":"entity","parentId":"0192f3a1-7c2e-7b4d-9a61-200000000001","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","name":"Agence Lyon 6e"},"entityName":"Agence Lyon 6e","role":{"id":"0192f3a1-7c2e-7b4d-9a61-320000000002","key":"member","name":"Member"}}],"blockedOrgs":[]}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/orgs/{orgId}/nodes":{"get":{"operationId":"listNodes","tags":["Structure"],"summary":"List the nodes of an organization","description":"The organization tree visible to the caller: the nodes above its memberships (for context) and everything below them.\n\n**Connected apps (delegated token):** the business scope consented by the user, within the rights of the user.","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Organization id."}],"responses":{"200":{"description":"Nodes (organization, entities, groups).","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Node"}},"nextPageToken":{"type":"string","description":"Present when there is a next page: pass it as `pageToken`."}}},"example":{"results":[{"id":"0192f3a1-7c2e-7b4d-9a61-200000000001","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","type":"organization","parentId":null,"entityId":null,"name":"Cabinet Bernard Immobilier","parentOrgId":null},{"id":"0192f3a1-7c2e-7b4d-9a61-200000000002","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","type":"entity","parentId":"0192f3a1-7c2e-7b4d-9a61-200000000001","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","name":"Agence Lyon 6e"},{"id":"0192f3a1-7c2e-7b4d-9a61-200000000004","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","type":"group","parentId":"0192f3a1-7c2e-7b4d-9a61-200000000002","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","name":"Gestion locative"}]}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `organization_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"organization_not_found":{"summary":"organization_not_found","value":{"error":{"code":"organization_not_found","message":"The organization does not exist or the caller has no access to it."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}},"post":{"operationId":"createNode","tags":["Structure"],"summary":"Create an entity or a group","description":"Entities go directly under the organization; groups under an entity or another group.\n\n**Permission:** `nodes.manage` on the target entity (API keys and people: from the role).  \n**Partner scope:** `nodes:write`.","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Organization id."},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key of this request (e.g. a UUID), reused for its retries. For 24 hours, a retry with the same key and the same body answers the recorded response (same status and body, header `Idempotent-Replayed: true`) without running the request again; the same key with another body answers `422 idempotency_key_reused`, and while the first request is running `409 idempotency_in_progress`. A failed request releases its key. A request interrupted after it started (its outcome is unknown) is never run twice: its key answers `409 idempotency_outcome_unknown`, retry with a new key once you have checked the resource. For `multipart/form-data` uploads, the key alone identifies the request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"x-mlt-permissions":["nodes.manage"],"x-mlt-partner-scopes":["nodes:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNodeBody"},"example":{"parentId":"0192f3a1-7c2e-7b4d-9a61-200000000002","type":"group","name":"Gestion locative"}}}},"responses":{"201":{"description":"The created node.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Node"},"example":{"id":"0192f3a1-7c2e-7b4d-9a61-200000000004","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","type":"group","parentId":"0192f3a1-7c2e-7b4d-9a61-200000000002","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","name":"Gestion locative"}}}},"400":{"description":"Malformed request body (not parseable). Codes: `bad_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"bad_request":{"summary":"bad_request","value":{"error":{"code":"bad_request","message":"The request body is not valid JSON (it cannot be parsed)."}}}}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `organization_not_found`, `node_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"organization_not_found":{"summary":"organization_not_found","value":{"error":{"code":"organization_not_found","message":"The organization does not exist or the caller has no access to it."}}},"node_not_found":{"summary":"node_not_found","value":{"error":{"code":"node_not_found","message":"The node does not exist or the caller cannot see it."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `idempotency_in_progress`, `idempotency_outcome_unknown`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with the same `Idempotency-Key` is still running: retry a little later."}}},"idempotency_outcome_unknown":{"summary":"idempotency_outcome_unknown","value":{"error":{"code":"idempotency_outcome_unknown","message":"The request with the same `Idempotency-Key` was interrupted and its outcome is unknown (it is never run twice): check the resource, then retry with a new key."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`, `invalid_parent`, `max_depth_reached`, `invalid_node_name`, `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}},"invalid_parent":{"summary":"invalid_parent","value":{"error":{"code":"invalid_parent","message":"Entities go under the organization, groups under an entity or a group."}}},"max_depth_reached":{"summary":"max_depth_reached","value":{"error":{"code":"max_depth_reached","message":"The organization tree is too deep."}}},"invalid_node_name":{"summary":"invalid_node_name","value":{"error":{"code":"invalid_node_name","message":"Invalid node name."}}},"idempotency_key_reused":{"summary":"idempotency_key_reused","value":{"error":{"code":"idempotency_key_reused","message":"The `Idempotency-Key` was already used (within 24 hours) for a different request: use a new key."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/nodes/{nodeId}":{"patch":{"operationId":"renameNode","tags":["Structure"],"summary":"Rename a node","description":"Renames an entity, a group or the organization.\n\n**Permission:** `nodes.manage` on the target entity (API keys and people: from the role).  \n**Partner scope:** `nodes:write`.","parameters":[{"name":"nodeId","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Node id."}],"x-mlt-permissions":["nodes.manage"],"x-mlt-partner-scopes":["nodes:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameNodeBody"},"example":{"name":"Gestion locative - Lyon"}}}},"responses":{"200":{"description":"The renamed node.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Node"},"example":{"id":"0192f3a1-7c2e-7b4d-9a61-200000000004","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","type":"group","parentId":"0192f3a1-7c2e-7b4d-9a61-200000000002","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","name":"Gestion locative - Lyon"}}}},"400":{"description":"Malformed request body (not parseable). Codes: `bad_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"bad_request":{"summary":"bad_request","value":{"error":{"code":"bad_request","message":"The request body is not valid JSON (it cannot be parsed)."}}}}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `node_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"node_not_found":{"summary":"node_not_found","value":{"error":{"code":"node_not_found","message":"The node does not exist or the caller cannot see it."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`, `invalid_node_name`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}},"invalid_node_name":{"summary":"invalid_node_name","value":{"error":{"code":"invalid_node_name","message":"Invalid node name."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}},"delete":{"operationId":"deleteNode","tags":["Structure"],"summary":"Delete a node","description":"Deletes an empty entity or group (no sub-group, no member). The organization node cannot be deleted.\n\n**Permission:** `nodes.manage` on the target entity (API keys and people: from the role).  \n**Partner scope:** `nodes:write`.","parameters":[{"name":"nodeId","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Node id."}],"x-mlt-permissions":["nodes.manage"],"x-mlt-partner-scopes":["nodes:write"],"responses":{"204":{"description":"Deleted.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`, `cannot_delete_organization`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}},"cannot_delete_organization":{"summary":"cannot_delete_organization","value":{"error":{"code":"cannot_delete_organization","message":"The organization node itself cannot be deleted."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `node_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"node_not_found":{"summary":"node_not_found","value":{"error":{"code":"node_not_found","message":"The node does not exist or the caller cannot see it."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `node_not_empty`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"node_not_empty":{"summary":"node_not_empty","value":{"error":{"code":"node_not_empty","message":"The node still has children or members."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/orgs/{orgId}/members":{"get":{"operationId":"listMembers","tags":["Members"],"summary":"List members","description":"Memberships of the organization visible to the caller (`members.read`), with the invitation state of each account.\n\n**Permission:** `members.read` on the target entity (API keys and people: from the role).  \n**Partner scope:** `members:write`.","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Organization id."},{"name":"nodeId","required":false,"in":"query","schema":{"format":"uuid","type":"string"},"description":"Only the memberships at this node and below."},{"name":"status","required":false,"in":"query","schema":{"type":"string","enum":["active","pending","expired"]},"description":"`active`, `pending` or `expired`."}],"x-mlt-permissions":["members.read"],"x-mlt-partner-scopes":["members:write"],"responses":{"200":{"description":"Members.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Member"}},"nextPageToken":{"type":"string","description":"Present when there is a next page: pass it as `pageToken`."}}},"example":{"results":[{"id":"0192f3a1-7c2e-7b4d-9a61-310000000002","user":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000003","email":"paul.martin@cabinet-bernard.fr","firstName":"Paul","lastName":"Martin"},"node":{"id":"0192f3a1-7c2e-7b4d-9a61-200000000004","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","type":"group","parentId":"0192f3a1-7c2e-7b4d-9a61-200000000002","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","name":"Gestion locative"},"role":{"id":"0192f3a1-7c2e-7b4d-9a61-320000000002","key":"member","name":"Member"},"createdAt":"2026-09-02T08:00:00.000Z","status":"pending","invitedAt":"2026-09-02T08:00:00.000Z","invitationExpiresAt":"2026-09-09T08:00:00.000Z","invitationResentAt":null,"invitedBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"}}]}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `organization_not_found`, `node_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"organization_not_found":{"summary":"organization_not_found","value":{"error":{"code":"organization_not_found","message":"The organization does not exist or the caller has no access to it."}}},"node_not_found":{"summary":"node_not_found","value":{"error":{"code":"node_not_found","message":"The node does not exist or the caller cannot see it."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}},"post":{"operationId":"inviteMember","tags":["Members"],"summary":"Invite a member","description":"Attaches a person to a node with a role and sends an invitation email (valid 7 days by default). The role cannot grant more than the caller has.\n\n**Permission:** `members.manage` on the target entity (API keys and people: from the role).  \n**Partner scope:** `members:write`.","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Organization id."},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key of this request (e.g. a UUID), reused for its retries. For 24 hours, a retry with the same key and the same body answers the recorded response (same status and body, header `Idempotent-Replayed: true`) without running the request again; the same key with another body answers `422 idempotency_key_reused`, and while the first request is running `409 idempotency_in_progress`. A failed request releases its key. A request interrupted after it started (its outcome is unknown) is never run twice: its key answers `409 idempotency_outcome_unknown`, retry with a new key once you have checked the resource. For `multipart/form-data` uploads, the key alone identifies the request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"x-mlt-permissions":["members.manage"],"x-mlt-partner-scopes":["members:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteMemberBody"},"example":{"email":"paul.martin@cabinet-bernard.fr","firstName":"Paul","lastName":"Martin","locale":"fr","nodeId":"0192f3a1-7c2e-7b4d-9a61-200000000004","roleId":"0192f3a1-7c2e-7b4d-9a61-320000000002"}}}},"responses":{"201":{"description":"The new membership.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Member"},"example":{"id":"0192f3a1-7c2e-7b4d-9a61-310000000002","user":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000003","email":"paul.martin@cabinet-bernard.fr","firstName":"Paul","lastName":"Martin"},"node":{"id":"0192f3a1-7c2e-7b4d-9a61-200000000004","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","type":"group","parentId":"0192f3a1-7c2e-7b4d-9a61-200000000002","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","name":"Gestion locative"},"role":{"id":"0192f3a1-7c2e-7b4d-9a61-320000000002","key":"member","name":"Member"},"createdAt":"2026-09-02T08:00:00.000Z","status":"pending","invitedAt":"2026-09-02T08:00:00.000Z","invitationExpiresAt":"2026-09-09T08:00:00.000Z","invitationResentAt":null,"invitedBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"}}}}},"400":{"description":"Malformed request body (not parseable). Codes: `bad_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"bad_request":{"summary":"bad_request","value":{"error":{"code":"bad_request","message":"The request body is not valid JSON (it cannot be parsed)."}}}}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`, `role_escalation`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}},"role_escalation":{"summary":"role_escalation","value":{"error":{"code":"role_escalation","message":"The role cannot be given: partner applications cannot grant `owner`, and nobody can grant more rights than their own."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `organization_not_found`, `node_not_found`, `role_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"organization_not_found":{"summary":"organization_not_found","value":{"error":{"code":"organization_not_found","message":"The organization does not exist or the caller has no access to it."}}},"node_not_found":{"summary":"node_not_found","value":{"error":{"code":"node_not_found","message":"The node does not exist or the caller cannot see it."}}},"role_not_found":{"summary":"role_not_found","value":{"error":{"code":"role_not_found","message":"The role does not exist in this organization."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `already_member`, `service_account`, `idempotency_in_progress`, `idempotency_outcome_unknown`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"already_member":{"summary":"already_member","value":{"error":{"code":"already_member","message":"The user already has a membership in this entity."}}},"service_account":{"summary":"service_account","value":{"error":{"code":"service_account","message":"Service accounts (API keys) cannot be invited or provisioned as members."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with the same `Idempotency-Key` is still running: retry a little later."}}},"idempotency_outcome_unknown":{"summary":"idempotency_outcome_unknown","value":{"error":{"code":"idempotency_outcome_unknown","message":"The request with the same `Idempotency-Key` was interrupted and its outcome is unknown (it is never run twice): check the resource, then retry with a new key."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`, `role_other_org`, `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}},"role_other_org":{"summary":"role_other_org","value":{"error":{"code":"role_other_org","message":"The role belongs to another organization."}}},"idempotency_key_reused":{"summary":"idempotency_key_reused","value":{"error":{"code":"idempotency_key_reused","message":"The `Idempotency-Key` was already used (within 24 hours) for a different request: use a new key."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/memberships/{id}":{"patch":{"operationId":"updateMembership","tags":["Members"],"summary":"Change the role or node of a member","description":"Changes the role and/or moves the membership to another node of the same entity.\n\n**Permission:** `members.manage` on the target entity (API keys and people: from the role).  \n**Partner scope:** `members:write`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Membership id."}],"x-mlt-permissions":["members.manage"],"x-mlt-partner-scopes":["members:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMembershipBody"},"example":{"roleId":"0192f3a1-7c2e-7b4d-9a61-320000000002","nodeId":"0192f3a1-7c2e-7b4d-9a61-200000000002"}}}},"responses":{"200":{"description":"The membership.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Membership"},"example":{"id":"0192f3a1-7c2e-7b4d-9a61-310000000002","user":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000003","email":"paul.martin@cabinet-bernard.fr","firstName":"Paul","lastName":"Martin"},"node":{"id":"0192f3a1-7c2e-7b4d-9a61-200000000004","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","type":"group","parentId":"0192f3a1-7c2e-7b4d-9a61-200000000002","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","name":"Gestion locative"},"role":{"id":"0192f3a1-7c2e-7b4d-9a61-320000000002","key":"member","name":"Member"},"createdAt":"2026-09-02T08:00:00.000Z"}}}},"400":{"description":"Malformed request body (not parseable). Codes: `bad_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"bad_request":{"summary":"bad_request","value":{"error":{"code":"bad_request","message":"The request body is not valid JSON (it cannot be parsed)."}}}}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`, `role_escalation`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}},"role_escalation":{"summary":"role_escalation","value":{"error":{"code":"role_escalation","message":"The role cannot be given: partner applications cannot grant `owner`, and nobody can grant more rights than their own."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `membership_not_found`, `node_not_found`, `role_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"membership_not_found":{"summary":"membership_not_found","value":{"error":{"code":"membership_not_found","message":"The membership does not exist or the caller cannot see it."}}},"node_not_found":{"summary":"node_not_found","value":{"error":{"code":"node_not_found","message":"The node does not exist or the caller cannot see it."}}},"role_not_found":{"summary":"role_not_found","value":{"error":{"code":"role_not_found","message":"The role does not exist in this organization."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `last_owner`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"last_owner":{"summary":"last_owner","value":{"error":{"code":"last_owner","message":"The last owner of an organization cannot be removed or demoted."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`, `membership_move_other_entity`, `role_other_org`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}},"membership_move_other_entity":{"summary":"membership_move_other_entity","value":{"error":{"code":"membership_move_other_entity","message":"A membership can only move inside its entity."}}},"role_other_org":{"summary":"role_other_org","value":{"error":{"code":"role_other_org","message":"The role belongs to another organization."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}},"delete":{"operationId":"removeMembership","tags":["Members"],"summary":"Remove a member","description":"Removes the membership. The last owner of the organization cannot be removed.\n\n**Permission:** `members.manage` on the target entity (API keys and people: from the role).  \n**Partner scope:** `members:write`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Membership id."}],"x-mlt-permissions":["members.manage"],"x-mlt-partner-scopes":["members:write"],"responses":{"204":{"description":"Removed.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `membership_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"membership_not_found":{"summary":"membership_not_found","value":{"error":{"code":"membership_not_found","message":"The membership does not exist or the caller cannot see it."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `last_owner`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"last_owner":{"summary":"last_owner","value":{"error":{"code":"last_owner","message":"The last owner of an organization cannot be removed or demoted."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/orgs/{orgId}/roles":{"get":{"operationId":"listRoles","tags":["Structure"],"summary":"List the roles of an organization","description":"System roles (`owner`, `admin`, `manager`, `member`, `viewer`) and custom roles, with their permissions. Use a role `id` when adding a member.\n\n**Connected apps (delegated token):** the business scope consented by the user, within the rights of the user.","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Organization id."}],"responses":{"200":{"description":"Roles.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Role"}},"nextPageToken":{"type":"string","description":"Present when there is a next page: pass it as `pageToken`."}}},"example":{"results":[{"id":"0192f3a1-7c2e-7b4d-9a61-320000000002","key":"member","name":"Member","permissions":["members.read","tasks.use","signature.read","signature.send","registered_mail.read","registered_mail.send","contacts.read","contacts.write"],"system":true,"version":1,"definedByOrgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","inherited":false}]}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `organization_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"organization_not_found":{"summary":"organization_not_found","value":{"error":{"code":"organization_not_found","message":"The organization does not exist or the caller has no access to it."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/oauth/grants/exchange":{"post":{"operationId":"exchangeAuthorizationCode","tags":["Connected apps"],"summary":"Exchange an authorization code","description":"After an administrator approved your application on the consent page, MyCLM redirects to your `redirect_uri` with `code` and `state`. Exchange the code (single use, valid 10 minutes) to confirm the grant; send `codeVerifier` when you started the flow with a PKCE `code_challenge`. From then on your application token can access the organization with the granted scopes.\n\n**Partner applications only.**","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key of this request (e.g. a UUID), reused for its retries. For 24 hours, a retry with the same key and the same body answers the recorded response (same status and body, header `Idempotent-Replayed: true`) without running the request again; the same key with another body answers `422 idempotency_key_reused`, and while the first request is running `409 idempotency_in_progress`. A failed request releases its key. A request interrupted after it started (its outcome is unknown) is never run twice: its key answers `409 idempotency_outcome_unknown`, retry with a new key once you have checked the resource. For `multipart/form-data` uploads, the key alone identifies the request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"x-mlt-partner-only":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeCodeBody"},"example":{"code":"Zr8f3LqB0n5tXw2Vy6Kd1Hj9Mp4Sa7Ue0Qc3Rb8Tg1E","redirectUri":"https://app.immocrm.fr/integrations/mylegitech/callback","codeVerifier":"dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk"}}}},"responses":{"200":{"description":"The confirmed grant.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantExchange"},"example":{"grantId":"0192f3a1-7c2e-7b4d-9a61-800000000011","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","orgName":"Cabinet Bernard Immobilier","scopes":["signature:write","contacts:read"],"grantedAt":"2026-09-30T15:04:00.000Z"}}}},"400":{"description":"Malformed request body (not parseable). Codes: `bad_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"bad_request":{"summary":"bad_request","value":{"error":{"code":"bad_request","message":"The request body is not valid JSON (it cannot be parsed)."}}}}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `partner_app_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"partner_app_only":{"summary":"partner_app_only","value":{"error":{"code":"partner_app_only","message":"Reserved to partner applications."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `grant_revoked`, `idempotency_in_progress`, `idempotency_outcome_unknown`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"grant_revoked":{"summary":"grant_revoked","value":{"error":{"code":"grant_revoked","message":"The grant behind the authorization code was revoked in the meantime."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with the same `Idempotency-Key` is still running: retry a little later."}}},"idempotency_outcome_unknown":{"summary":"idempotency_outcome_unknown","value":{"error":{"code":"idempotency_outcome_unknown","message":"The request with the same `Idempotency-Key` was interrupted and its outcome is unknown (it is never run twice): check the resource, then retry with a new key."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`, `invalid_grant`, `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}},"invalid_grant":{"summary":"invalid_grant","value":{"error":{"code":"invalid_grant","message":"The authorization code is invalid, expired, already used, or the `redirectUri` / `codeVerifier` does not match."}}},"idempotency_key_reused":{"summary":"idempotency_key_reused","value":{"error":{"code":"idempotency_key_reused","message":"The `Idempotency-Key` was already used (within 24 hours) for a different request: use a new key."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/oauth/grants":{"get":{"operationId":"listMyGrants","tags":["Connected apps"],"summary":"List the grants of the application","description":"Active grants of the calling application: the organizations it can access, with the scopes and role of each grant.\n\n**Partner applications only.**","x-mlt-partner-only":true,"responses":{"200":{"description":"Grants.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/OAuthGrant"}},"nextPageToken":{"type":"string","description":"Present when there is a next page: pass it as `pageToken`."}}},"example":{"results":[{"id":"0192f3a1-7c2e-7b4d-9a61-800000000011","app":{"id":"0192f3a1-7c2e-7b4d-9a61-800000000001","name":"ImmoCRM","description":"CRM pour agences immobilières","scopes":["signature:write","contacts:read","members:write"]},"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","orgName":"Cabinet Bernard Immobilier","scopes":["signature:write","contacts:read"],"role":{"id":"0192f3a1-7c2e-7b4d-9a61-320000000002","name":"Member"},"source":"consent","allMembers":false,"consentCount":4,"grantedBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"},"grantedAt":"2026-09-30T15:04:00.000Z","revokedAt":null}]}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `partner_app_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"partner_app_only":{"summary":"partner_app_only","value":{"error":{"code":"partner_app_only","message":"Reserved to partner applications."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/provisioning/orgs":{"get":{"operationId":"listProvisionedOrganizations","tags":["Provisioning"],"summary":"List the organizations of the application","description":"Organizations the application has an active grant on (provisioned or consented). Filter by `externalId`.\n\n**Partner applications only.**","parameters":[{"name":"externalId","required":false,"in":"query","schema":{"minLength":1,"maxLength":120,"type":"string"},"description":"Your identifier of the organization."}],"x-mlt-partner-only":true,"responses":{"200":{"description":"Organizations.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/ProvisionedNode"}},"nextPageToken":{"type":"string","description":"Present when there is a next page: pass it as `pageToken`."}}},"example":{"results":[{"id":"0192f3a1-7c2e-7b4d-9a61-200000000001","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","type":"organization","parentId":null,"name":"Cabinet Bernard Immobilier","externalId":"agency-8841"}]}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `partner_app_only`, `machine_credentials_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"partner_app_only":{"summary":"partner_app_only","value":{"error":{"code":"partner_app_only","message":"Reserved to partner applications."}}},"machine_credentials_required":{"summary":"machine_credentials_required","value":{"error":{"code":"machine_credentials_required","message":"Provisioning requires the machine credentials (`client_credentials`) of the partner application, not a delegated token."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}},"post":{"operationId":"provisionOrganization","tags":["Provisioning"],"summary":"Provision an organization","description":"Creates an organization with its first entity and its owner, and grants the application access to it. With `sendInvitation: false` the owner account is created without invitation email (SSO, or your own onboarding). Requires the `orgs:write` scope.\n\nIdempotent by `externalId`: when a resource with the same `externalId` exists, it is returned with `200` and `created: false` instead of `201`.\n\n**Partner applications only.**  \n**Partner scope:** `orgs:write`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key of this request (e.g. a UUID), reused for its retries. For 24 hours, a retry with the same key and the same body answers the recorded response (same status and body, header `Idempotent-Replayed: true`) without running the request again; the same key with another body answers `422 idempotency_key_reused`, and while the first request is running `409 idempotency_in_progress`. A failed request releases its key. A request interrupted after it started (its outcome is unknown) is never run twice: its key answers `409 idempotency_outcome_unknown`, retry with a new key once you have checked the resource. For `multipart/form-data` uploads, the key alone identifies the request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"x-mlt-partner-scopes":["orgs:write"],"x-mlt-partner-only":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionOrgBody"},"example":{"name":"Cabinet Bernard Immobilier","externalId":"agency-8841","firstEntity":{"name":"Agence Lyon 6e","externalId":"agency-8841-lyon6"},"owner":{"email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard","locale":"fr","externalId":"user-1207","sendInvitation":false}}}}},"responses":{"200":{"description":"The organization already existed (`created: false`).","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionedOrg"},"example":{"org":{"id":"0192f3a1-7c2e-7b4d-9a61-200000000001","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","type":"organization","parentId":null,"name":"Cabinet Bernard Immobilier","externalId":"agency-8841"},"nodes":[{"id":"0192f3a1-7c2e-7b4d-9a61-200000000001","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","type":"organization","parentId":null,"name":"Cabinet Bernard Immobilier","externalId":"agency-8841"},{"id":"0192f3a1-7c2e-7b4d-9a61-200000000002","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","type":"entity","parentId":"0192f3a1-7c2e-7b4d-9a61-200000000001","name":"Agence Lyon 6e","externalId":"agency-8841-lyon6"}],"created":false}}}},"201":{"description":"The organization was created.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionedOrg"},"example":{"org":{"id":"0192f3a1-7c2e-7b4d-9a61-200000000001","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","type":"organization","parentId":null,"name":"Cabinet Bernard Immobilier","externalId":"agency-8841"},"nodes":[{"id":"0192f3a1-7c2e-7b4d-9a61-200000000001","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","type":"organization","parentId":null,"name":"Cabinet Bernard Immobilier","externalId":"agency-8841"},{"id":"0192f3a1-7c2e-7b4d-9a61-200000000002","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","type":"entity","parentId":"0192f3a1-7c2e-7b4d-9a61-200000000001","name":"Agence Lyon 6e","externalId":"agency-8841-lyon6"}],"created":true}}}},"400":{"description":"Malformed request body (not parseable). Codes: `bad_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"bad_request":{"summary":"bad_request","value":{"error":{"code":"bad_request","message":"The request body is not valid JSON (it cannot be parsed)."}}}}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `partner_app_only`, `insufficient_scope`, `machine_credentials_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"partner_app_only":{"summary":"partner_app_only","value":{"error":{"code":"partner_app_only","message":"Reserved to partner applications."}}},"insufficient_scope":{"summary":"insufficient_scope","value":{"error":{"code":"insufficient_scope","message":"The partner application does not have the scope required by this operation."}}},"machine_credentials_required":{"summary":"machine_credentials_required","value":{"error":{"code":"machine_credentials_required","message":"Provisioning requires the machine credentials (`client_credentials`) of the partner application, not a delegated token."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `external_id_taken`, `service_account`, `idempotency_in_progress`, `idempotency_outcome_unknown`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"external_id_taken":{"summary":"external_id_taken","value":{"error":{"code":"external_id_taken","message":"This `externalId` is already used by another resource of the same kind."}}},"service_account":{"summary":"service_account","value":{"error":{"code":"service_account","message":"Service accounts (API keys) cannot be invited or provisioned as members."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with the same `Idempotency-Key` is still running: retry a little later."}}},"idempotency_outcome_unknown":{"summary":"idempotency_outcome_unknown","value":{"error":{"code":"idempotency_outcome_unknown","message":"The request with the same `Idempotency-Key` was interrupted and its outcome is unknown (it is never run twice): check the resource, then retry with a new key."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`, `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}},"idempotency_key_reused":{"summary":"idempotency_key_reused","value":{"error":{"code":"idempotency_key_reused","message":"The `Idempotency-Key` was already used (within 24 hours) for a different request: use a new key."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/provisioning/orgs/{orgId}/nodes":{"get":{"operationId":"listProvisionedNodes","tags":["Provisioning"],"summary":"List the nodes of an organization","description":"Entities and groups of an organization the application has access to, with their `externalId`.\n\n**Partner applications only.**","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Organization id."},{"name":"externalId","required":false,"in":"query","schema":{"minLength":1,"maxLength":120,"type":"string"},"description":"Only the node with this `externalId`."}],"x-mlt-partner-only":true,"responses":{"200":{"description":"Nodes.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/ProvisionedNode"}},"nextPageToken":{"type":"string","description":"Present when there is a next page: pass it as `pageToken`."}}},"example":{"results":[{"id":"0192f3a1-7c2e-7b4d-9a61-200000000001","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","type":"organization","parentId":null,"name":"Cabinet Bernard Immobilier","externalId":"agency-8841"},{"id":"0192f3a1-7c2e-7b4d-9a61-200000000002","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","type":"entity","parentId":"0192f3a1-7c2e-7b4d-9a61-200000000001","name":"Agence Lyon 6e","externalId":"agency-8841-lyon6"},{"id":"0192f3a1-7c2e-7b4d-9a61-200000000004","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","type":"group","parentId":"0192f3a1-7c2e-7b4d-9a61-200000000002","name":"Gestion locative","externalId":"team-42"}]}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `partner_app_only`, `machine_credentials_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"partner_app_only":{"summary":"partner_app_only","value":{"error":{"code":"partner_app_only","message":"Reserved to partner applications."}}},"machine_credentials_required":{"summary":"machine_credentials_required","value":{"error":{"code":"machine_credentials_required","message":"Provisioning requires the machine credentials (`client_credentials`) of the partner application, not a delegated token."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `organization_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"organization_not_found":{"summary":"organization_not_found","value":{"error":{"code":"organization_not_found","message":"The organization does not exist or the caller has no access to it."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}},"post":{"operationId":"provisionNode","tags":["Provisioning"],"summary":"Provision an entity or a group","description":"Creates an entity (under the organization) or a group (under `parentId` or `parentExternalId`). Requires the `nodes:write` scope.\n\nIdempotent by `externalId`: when a resource with the same `externalId` exists, it is returned with `200` and `created: false` instead of `201`.\n\n**Partner applications only.**  \n**Partner scope:** `nodes:write`.","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Organization id."},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key of this request (e.g. a UUID), reused for its retries. For 24 hours, a retry with the same key and the same body answers the recorded response (same status and body, header `Idempotent-Replayed: true`) without running the request again; the same key with another body answers `422 idempotency_key_reused`, and while the first request is running `409 idempotency_in_progress`. A failed request releases its key. A request interrupted after it started (its outcome is unknown) is never run twice: its key answers `409 idempotency_outcome_unknown`, retry with a new key once you have checked the resource. For `multipart/form-data` uploads, the key alone identifies the request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"x-mlt-partner-scopes":["nodes:write"],"x-mlt-partner-only":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionNodeBody"},"example":{"parentExternalId":"agency-8841-lyon6","type":"group","name":"Gestion locative","externalId":"team-42"}}}},"responses":{"200":{"description":"The node already existed.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionedNodeResult"},"example":{"node":{"id":"0192f3a1-7c2e-7b4d-9a61-200000000004","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","type":"group","parentId":"0192f3a1-7c2e-7b4d-9a61-200000000002","name":"Gestion locative","externalId":"team-42"},"created":false}}}},"201":{"description":"The node was created.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionedNodeResult"},"example":{"node":{"id":"0192f3a1-7c2e-7b4d-9a61-200000000004","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","type":"group","parentId":"0192f3a1-7c2e-7b4d-9a61-200000000002","name":"Gestion locative","externalId":"team-42"},"created":true}}}},"400":{"description":"Malformed request body (not parseable). Codes: `bad_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"bad_request":{"summary":"bad_request","value":{"error":{"code":"bad_request","message":"The request body is not valid JSON (it cannot be parsed)."}}}}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `partner_app_only`, `insufficient_scope`, `machine_credentials_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"partner_app_only":{"summary":"partner_app_only","value":{"error":{"code":"partner_app_only","message":"Reserved to partner applications."}}},"insufficient_scope":{"summary":"insufficient_scope","value":{"error":{"code":"insufficient_scope","message":"The partner application does not have the scope required by this operation."}}},"machine_credentials_required":{"summary":"machine_credentials_required","value":{"error":{"code":"machine_credentials_required","message":"Provisioning requires the machine credentials (`client_credentials`) of the partner application, not a delegated token."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `organization_not_found`, `node_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"organization_not_found":{"summary":"organization_not_found","value":{"error":{"code":"organization_not_found","message":"The organization does not exist or the caller has no access to it."}}},"node_not_found":{"summary":"node_not_found","value":{"error":{"code":"node_not_found","message":"The node does not exist or the caller cannot see it."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `external_id_taken`, `idempotency_in_progress`, `idempotency_outcome_unknown`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"external_id_taken":{"summary":"external_id_taken","value":{"error":{"code":"external_id_taken","message":"This `externalId` is already used by another resource of the same kind."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with the same `Idempotency-Key` is still running: retry a little later."}}},"idempotency_outcome_unknown":{"summary":"idempotency_outcome_unknown","value":{"error":{"code":"idempotency_outcome_unknown","message":"The request with the same `Idempotency-Key` was interrupted and its outcome is unknown (it is never run twice): check the resource, then retry with a new key."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`, `invalid_parent`, `max_depth_reached`, `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}},"invalid_parent":{"summary":"invalid_parent","value":{"error":{"code":"invalid_parent","message":"Entities go under the organization, groups under an entity or a group."}}},"max_depth_reached":{"summary":"max_depth_reached","value":{"error":{"code":"max_depth_reached","message":"The organization tree is too deep."}}},"idempotency_key_reused":{"summary":"idempotency_key_reused","value":{"error":{"code":"idempotency_key_reused","message":"The `Idempotency-Key` was already used (within 24 hours) for a different request: use a new key."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/provisioning/orgs/{orgId}/members":{"post":{"operationId":"provisionMember","tags":["Provisioning"],"summary":"Provision a member","description":"Adds a person to a node (`nodeId` or `nodeExternalId`) with a role (system role key such as `member`, or a role id). The account is created if needed; `sendInvitation: false` skips the invitation email. Requires the `members:write` scope.\n\nIdempotent by `externalId`: when a resource with the same `externalId` exists, it is returned with `200` and `created: false` instead of `201`.\n\n**Partner applications only.**  \n**Partner scope:** `members:write`.","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Organization id."},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key of this request (e.g. a UUID), reused for its retries. For 24 hours, a retry with the same key and the same body answers the recorded response (same status and body, header `Idempotent-Replayed: true`) without running the request again; the same key with another body answers `422 idempotency_key_reused`, and while the first request is running `409 idempotency_in_progress`. A failed request releases its key. A request interrupted after it started (its outcome is unknown) is never run twice: its key answers `409 idempotency_outcome_unknown`, retry with a new key once you have checked the resource. For `multipart/form-data` uploads, the key alone identifies the request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"x-mlt-partner-scopes":["members:write"],"x-mlt-partner-only":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionMemberBody"},"example":{"email":"paul.martin@cabinet-bernard.fr","firstName":"Paul","lastName":"Martin","locale":"fr","externalId":"user-1208","sendInvitation":true,"nodeExternalId":"team-42","role":"member"}}}},"responses":{"200":{"description":"The membership already existed.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionedMember"},"example":{"membershipId":"0192f3a1-7c2e-7b4d-9a61-310000000002","userId":"0192f3a1-7c2e-7b4d-9a61-300000000003","email":"paul.martin@cabinet-bernard.fr","externalId":"user-1208","nodeId":"0192f3a1-7c2e-7b4d-9a61-200000000004","roleId":"0192f3a1-7c2e-7b4d-9a61-320000000002","invited":false,"created":false}}}},"201":{"description":"The membership was created.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionedMember"},"example":{"membershipId":"0192f3a1-7c2e-7b4d-9a61-310000000002","userId":"0192f3a1-7c2e-7b4d-9a61-300000000003","email":"paul.martin@cabinet-bernard.fr","externalId":"user-1208","nodeId":"0192f3a1-7c2e-7b4d-9a61-200000000004","roleId":"0192f3a1-7c2e-7b4d-9a61-320000000002","invited":true,"created":true}}}},"400":{"description":"Malformed request body (not parseable). Codes: `bad_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"bad_request":{"summary":"bad_request","value":{"error":{"code":"bad_request","message":"The request body is not valid JSON (it cannot be parsed)."}}}}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `partner_app_only`, `insufficient_scope`, `role_escalation`, `machine_credentials_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"partner_app_only":{"summary":"partner_app_only","value":{"error":{"code":"partner_app_only","message":"Reserved to partner applications."}}},"insufficient_scope":{"summary":"insufficient_scope","value":{"error":{"code":"insufficient_scope","message":"The partner application does not have the scope required by this operation."}}},"role_escalation":{"summary":"role_escalation","value":{"error":{"code":"role_escalation","message":"The role cannot be given: partner applications cannot grant `owner`, and nobody can grant more rights than their own."}}},"machine_credentials_required":{"summary":"machine_credentials_required","value":{"error":{"code":"machine_credentials_required","message":"Provisioning requires the machine credentials (`client_credentials`) of the partner application, not a delegated token."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `organization_not_found`, `node_not_found`, `role_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"organization_not_found":{"summary":"organization_not_found","value":{"error":{"code":"organization_not_found","message":"The organization does not exist or the caller has no access to it."}}},"node_not_found":{"summary":"node_not_found","value":{"error":{"code":"node_not_found","message":"The node does not exist or the caller cannot see it."}}},"role_not_found":{"summary":"role_not_found","value":{"error":{"code":"role_not_found","message":"The role does not exist in this organization."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `external_id_taken`, `already_member`, `service_account`, `idempotency_in_progress`, `idempotency_outcome_unknown`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"external_id_taken":{"summary":"external_id_taken","value":{"error":{"code":"external_id_taken","message":"This `externalId` is already used by another resource of the same kind."}}},"already_member":{"summary":"already_member","value":{"error":{"code":"already_member","message":"The user already has a membership in this entity."}}},"service_account":{"summary":"service_account","value":{"error":{"code":"service_account","message":"Service accounts (API keys) cannot be invited or provisioned as members."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with the same `Idempotency-Key` is still running: retry a little later."}}},"idempotency_outcome_unknown":{"summary":"idempotency_outcome_unknown","value":{"error":{"code":"idempotency_outcome_unknown","message":"The request with the same `Idempotency-Key` was interrupted and its outcome is unknown (it is never run twice): check the resource, then retry with a new key."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`, `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}},"idempotency_key_reused":{"summary":"idempotency_key_reused","value":{"error":{"code":"idempotency_key_reused","message":"The `Idempotency-Key` was already used (within 24 hours) for a different request: use a new key."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/provisioning/memberships/{id}":{"patch":{"operationId":"updateProvisionedMembership","tags":["Provisioning"],"summary":"Update a provisioned membership","description":"Changes the role and/or node of a membership in an organization the application has access to. Requires the `members:write` scope.\n\n**Partner applications only.**  \n**Partner scope:** `members:write`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Membership id."}],"x-mlt-partner-scopes":["members:write"],"x-mlt-partner-only":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionUpdateMembershipBody"},"example":{"role":"manager"}}}},"responses":{"200":{"description":"The membership.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionedMember"},"example":{"membershipId":"0192f3a1-7c2e-7b4d-9a61-310000000002","userId":"0192f3a1-7c2e-7b4d-9a61-300000000003","email":"paul.martin@cabinet-bernard.fr","externalId":"user-1208","nodeId":"0192f3a1-7c2e-7b4d-9a61-200000000004","roleId":"0192f3a1-7c2e-7b4d-9a61-320000000002","invited":false,"created":false}}}},"400":{"description":"Malformed request body (not parseable). Codes: `bad_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"bad_request":{"summary":"bad_request","value":{"error":{"code":"bad_request","message":"The request body is not valid JSON (it cannot be parsed)."}}}}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `partner_app_only`, `insufficient_scope`, `role_escalation`, `machine_credentials_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"partner_app_only":{"summary":"partner_app_only","value":{"error":{"code":"partner_app_only","message":"Reserved to partner applications."}}},"insufficient_scope":{"summary":"insufficient_scope","value":{"error":{"code":"insufficient_scope","message":"The partner application does not have the scope required by this operation."}}},"role_escalation":{"summary":"role_escalation","value":{"error":{"code":"role_escalation","message":"The role cannot be given: partner applications cannot grant `owner`, and nobody can grant more rights than their own."}}},"machine_credentials_required":{"summary":"machine_credentials_required","value":{"error":{"code":"machine_credentials_required","message":"Provisioning requires the machine credentials (`client_credentials`) of the partner application, not a delegated token."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `membership_not_found`, `node_not_found`, `role_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"membership_not_found":{"summary":"membership_not_found","value":{"error":{"code":"membership_not_found","message":"The membership does not exist or the caller cannot see it."}}},"node_not_found":{"summary":"node_not_found","value":{"error":{"code":"node_not_found","message":"The node does not exist or the caller cannot see it."}}},"role_not_found":{"summary":"role_not_found","value":{"error":{"code":"role_not_found","message":"The role does not exist in this organization."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `last_owner`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"last_owner":{"summary":"last_owner","value":{"error":{"code":"last_owner","message":"The last owner of an organization cannot be removed or demoted."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}},"delete":{"operationId":"removeProvisionedMembership","tags":["Provisioning"],"summary":"Remove a provisioned membership","description":"Removes a membership from an organization the application has access to. Requires the `members:write` scope.\n\n**Partner applications only.**  \n**Partner scope:** `members:write`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Membership id."}],"x-mlt-partner-scopes":["members:write"],"x-mlt-partner-only":true,"responses":{"204":{"description":"Removed.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `partner_app_only`, `insufficient_scope`, `machine_credentials_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"partner_app_only":{"summary":"partner_app_only","value":{"error":{"code":"partner_app_only","message":"Reserved to partner applications."}}},"insufficient_scope":{"summary":"insufficient_scope","value":{"error":{"code":"insufficient_scope","message":"The partner application does not have the scope required by this operation."}}},"machine_credentials_required":{"summary":"machine_credentials_required","value":{"error":{"code":"machine_credentials_required","message":"Provisioning requires the machine credentials (`client_credentials`) of the partner application, not a delegated token."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `membership_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"membership_not_found":{"summary":"membership_not_found","value":{"error":{"code":"membership_not_found","message":"The membership does not exist or the caller cannot see it."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `last_owner`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"last_owner":{"summary":"last_owner","value":{"error":{"code":"last_owner","message":"The last owner of an organization cannot be removed or demoted."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/provisioning/users":{"get":{"operationId":"findProvisionedUser","tags":["Provisioning"],"summary":"Find a user by external id","description":"The user with this `externalId` and their memberships in the organizations of the application (e.g. to update or remove a provisioned membership).\n\n**Partner applications only.**","parameters":[{"name":"externalId","required":false,"in":"query","schema":{"minLength":1,"maxLength":120,"type":"string"},"description":"Your identifier of the user (required)."}],"x-mlt-partner-only":true,"responses":{"200":{"description":"Zero or one user.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/ProvisionedUser"}},"nextPageToken":{"type":"string","description":"Present when there is a next page: pass it as `pageToken`."}}},"example":{"results":[{"id":"0192f3a1-7c2e-7b4d-9a61-300000000003","email":"paul.martin@cabinet-bernard.fr","firstName":"Paul","lastName":"Martin","externalId":"user-1208","memberships":[{"id":"0192f3a1-7c2e-7b4d-9a61-310000000002","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","nodeId":"0192f3a1-7c2e-7b4d-9a61-200000000004","roleId":"0192f3a1-7c2e-7b4d-9a61-320000000002"}]}]}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `partner_app_only`, `machine_credentials_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"partner_app_only":{"summary":"partner_app_only","value":{"error":{"code":"partner_app_only","message":"Reserved to partner applications."}}},"machine_credentials_required":{"summary":"machine_credentials_required","value":{"error":{"code":"machine_credentials_required","message":"Provisioning requires the machine credentials (`client_credentials`) of the partner application, not a delegated token."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`, `external_id_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}},"external_id_required":{"summary":"external_id_required","value":{"error":{"code":"external_id_required","message":"An `externalId` is required to look up this resource."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/tasks/occurrences":{"get":{"operationId":"listTaskOccurrences","tags":["Tasks"],"summary":"List task occurrences","description":"Occurrences of tasks in a time range (400 days max), recurring tasks expanded. `scope=mine` (default): tasks created by or assigned to the caller; `scope=team`: every task the caller can see (`tasks.read_all`).\n\n**Permission:** `tasks.use` on the target entity (API keys and people: from the role).  \n**Partner scope:** `tasks:read`.","parameters":[{"name":"pageToken","required":false,"in":"query","schema":{"maxLength":500,"type":"string"}},{"name":"pageSize","required":false,"in":"query","schema":{"minimum":1,"maximum":1000,"default":500,"type":"integer"}},{"name":"from","required":true,"in":"query","schema":{"format":"date-time","type":"string"},"description":"Start of the range (ISO 8601, inclusive)."},{"name":"to","required":true,"in":"query","schema":{"format":"date-time","type":"string"},"description":"End of the range (ISO 8601)."},{"name":"status","required":false,"in":"query","schema":{"type":"string","enum":["todo","done"]},"description":"`todo` or `done`."},{"name":"entityId","required":false,"in":"query","schema":{"format":"uuid","type":"string"},"description":"Only the tasks of this entity."},{"name":"scope","required":false,"in":"query","schema":{"default":"mine","type":"string","enum":["mine","team"]},"description":"`mine` (default) or `team`."}],"x-mlt-permissions":["tasks.use"],"x-mlt-partner-scopes":["tasks:read"],"responses":{"200":{"description":"Occurrences, by date.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/TaskOccurrence"}},"nextPageToken":{"type":"string","description":"Present when there is a next page: pass it as `pageToken`."}}},"example":{"results":[{"taskId":"0192f3a1-7c2e-7b4d-9a61-700000000001","occurrenceAt":"2026-10-06T07:00:00.000Z","status":"todo","title":"Relancer Marie Durand - état des lieux","priority":"high","recurring":false,"entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","assignee":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000003","email":"paul.martin@cabinet-bernard.fr","firstName":"Paul","lastName":"Martin"},"contact":{"id":"0192f3a1-7c2e-7b4d-9a61-600000000001","kind":"person","displayName":"Marie Durand"}}]}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/tasks/options":{"get":{"operationId":"getTaskOptions","tags":["Tasks"],"summary":"Retrieve the task options of an entity","description":"Default reminders and working hours (reminders outside working hours are postponed to the next working slot).\n\n**Permission:** `tasks.use` on the target entity (API keys and people: from the role).  \n**Partner scope:** `tasks:read`.","parameters":[{"name":"entityId","required":true,"in":"query","schema":{"format":"uuid","type":"string"},"description":"Entity id (see `GET /v1/me` → `scopes[].entityId`)."}],"x-mlt-permissions":["tasks.use"],"x-mlt-partner-scopes":["tasks:read"],"responses":{"200":{"description":"Effective options.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskOptions"},"example":{"defaultReminders":[{"offsetMinutes":1440}],"workingHours":{"enabled":true,"days":["mon","tue","wed","thu","fri"],"start":"09:00","end":"18:00"}}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`, `feature_disabled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}},"feature_disabled":{"summary":"feature_disabled","value":{"error":{"code":"feature_disabled","message":"The feature (signature, registered mail, tasks) is not enabled for this entity."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/tasks":{"post":{"operationId":"createTask","tags":["Tasks"],"summary":"Create a task","description":"Creates a one-off or recurring task, optionally assigned to a member and linked to a contact. The assignee is notified.\n\n**Permission:** `tasks.use` on the target entity (API keys and people: from the role).  \n**Partner scope:** `tasks:write`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key of this request (e.g. a UUID), reused for its retries. For 24 hours, a retry with the same key and the same body answers the recorded response (same status and body, header `Idempotent-Replayed: true`) without running the request again; the same key with another body answers `422 idempotency_key_reused`, and while the first request is running `409 idempotency_in_progress`. A failed request releases its key. A request interrupted after it started (its outcome is unknown) is never run twice: its key answers `409 idempotency_outcome_unknown`, retry with a new key once you have checked the resource. For `multipart/form-data` uploads, the key alone identifies the request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"x-mlt-permissions":["tasks.use"],"x-mlt-partner-scopes":["tasks:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTaskBody"},"example":{"entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","title":"Relancer Marie Durand - état des lieux","description":"Confirmer la date de l’état des lieux d’entrée du lot 12.","priority":"high","startAt":"2026-10-06T07:00:00.000Z","timezone":"Europe/Paris","reminders":[{"offsetMinutes":60}],"assigneeId":"0192f3a1-7c2e-7b4d-9a61-300000000003","contactId":"0192f3a1-7c2e-7b4d-9a61-600000000001"}}}},"responses":{"201":{"description":"The created task.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"id":"0192f3a1-7c2e-7b4d-9a61-700000000001","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","title":"Relancer Marie Durand - état des lieux","description":"Confirmer la date de l’état des lieux d’entrée du lot 12.","priority":"high","startAt":"2026-10-06T07:00:00.000Z","timezone":"Europe/Paris","recurrence":null,"reminders":[{"offsetMinutes":60}],"assignee":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000003","email":"paul.martin@cabinet-bernard.fr","firstName":"Paul","lastName":"Martin"},"contact":{"id":"0192f3a1-7c2e-7b4d-9a61-600000000001","kind":"person","displayName":"Marie Durand"},"createdBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"},"createdAt":"2026-10-01T11:00:00.000Z","link":null,"version":1}}}},"400":{"description":"Malformed request body (not parseable). Codes: `bad_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"bad_request":{"summary":"bad_request","value":{"error":{"code":"bad_request","message":"The request body is not valid JSON (it cannot be parsed)."}}}}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`, `feature_disabled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}},"feature_disabled":{"summary":"feature_disabled","value":{"error":{"code":"feature_disabled","message":"The feature (signature, registered mail, tasks) is not enabled for this entity."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `idempotency_in_progress`, `idempotency_outcome_unknown`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with the same `Idempotency-Key` is still running: retry a little later."}}},"idempotency_outcome_unknown":{"summary":"idempotency_outcome_unknown","value":{"error":{"code":"idempotency_outcome_unknown","message":"The request with the same `Idempotency-Key` was interrupted and its outcome is unknown (it is never run twice): check the resource, then retry with a new key."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`, `invalid_assignee`, `invalid_recurrence`, `invalid_timezone`, `invalid_contact`, `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}},"invalid_assignee":{"summary":"invalid_assignee","value":{"error":{"code":"invalid_assignee","message":"The assignee cannot use tasks in this entity."}}},"invalid_recurrence":{"summary":"invalid_recurrence","value":{"error":{"code":"invalid_recurrence","message":"The recurrence is invalid."}}},"invalid_timezone":{"summary":"invalid_timezone","value":{"error":{"code":"invalid_timezone","message":"Unknown IANA time zone."}}},"invalid_contact":{"summary":"invalid_contact","value":{"error":{"code":"invalid_contact","message":"A linked `contactId` is not visible to the caller or does not belong to the resource entity."}}},"idempotency_key_reused":{"summary":"idempotency_key_reused","value":{"error":{"code":"idempotency_key_reused","message":"The `Idempotency-Key` was already used (within 24 hours) for a different request: use a new key."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/tasks/{id}":{"get":{"operationId":"getTask","tags":["Tasks"],"summary":"Retrieve a task","description":"The task definition (recurrence, reminders, assignee, contact).\n\n**Permission:** `tasks.use` on the target entity (API keys and people: from the role).  \n**Partner scope:** `tasks:read`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)."}],"x-mlt-permissions":["tasks.use"],"x-mlt-partner-scopes":["tasks:read"],"responses":{"200":{"description":"The task.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"id":"0192f3a1-7c2e-7b4d-9a61-700000000001","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","title":"Relancer Marie Durand - état des lieux","description":"Confirmer la date de l’état des lieux d’entrée du lot 12.","priority":"high","startAt":"2026-10-06T07:00:00.000Z","timezone":"Europe/Paris","recurrence":null,"reminders":[{"offsetMinutes":60}],"assignee":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000003","email":"paul.martin@cabinet-bernard.fr","firstName":"Paul","lastName":"Martin"},"contact":{"id":"0192f3a1-7c2e-7b4d-9a61-600000000001","kind":"person","displayName":"Marie Durand"},"createdBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"},"createdAt":"2026-10-01T11:00:00.000Z","link":null,"version":1}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `task_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"task_not_found":{"summary":"task_not_found","value":{"error":{"code":"task_not_found","message":"The task does not exist or the caller cannot see it."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}},"patch":{"operationId":"updateTask","tags":["Tasks"],"summary":"Update a task","description":"PATCH semantics: omitted fields are unchanged, `null` clears a field. Changing the schedule drops the statuses of future occurrences that no longer exist.\n\n**Permission:** `tasks.use` on the target entity (API keys and people: from the role).  \n**Partner scope:** `tasks:write`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)."}],"x-mlt-permissions":["tasks.use"],"x-mlt-partner-scopes":["tasks:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTaskBody"},"example":{"priority":"medium","startAt":"2026-10-07T07:00:00.000Z","recurrence":{"frequency":"weekly","interval":1,"weekdays":["TU"],"count":4}}}}},"responses":{"200":{"description":"The updated task.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"id":"0192f3a1-7c2e-7b4d-9a61-700000000001","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","title":"Relancer Marie Durand - état des lieux","description":"Confirmer la date de l’état des lieux d’entrée du lot 12.","priority":"high","startAt":"2026-10-06T07:00:00.000Z","timezone":"Europe/Paris","recurrence":null,"reminders":[{"offsetMinutes":60}],"assignee":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000003","email":"paul.martin@cabinet-bernard.fr","firstName":"Paul","lastName":"Martin"},"contact":{"id":"0192f3a1-7c2e-7b4d-9a61-600000000001","kind":"person","displayName":"Marie Durand"},"createdBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"},"createdAt":"2026-10-01T11:00:00.000Z","link":null,"version":1}}}},"400":{"description":"Malformed request body (not parseable). Codes: `bad_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"bad_request":{"summary":"bad_request","value":{"error":{"code":"bad_request","message":"The request body is not valid JSON (it cannot be parsed)."}}}}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `task_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"task_not_found":{"summary":"task_not_found","value":{"error":{"code":"task_not_found","message":"The task does not exist or the caller cannot see it."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`, `invalid_assignee`, `invalid_recurrence`, `invalid_timezone`, `invalid_contact`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}},"invalid_assignee":{"summary":"invalid_assignee","value":{"error":{"code":"invalid_assignee","message":"The assignee cannot use tasks in this entity."}}},"invalid_recurrence":{"summary":"invalid_recurrence","value":{"error":{"code":"invalid_recurrence","message":"The recurrence is invalid."}}},"invalid_timezone":{"summary":"invalid_timezone","value":{"error":{"code":"invalid_timezone","message":"Unknown IANA time zone."}}},"invalid_contact":{"summary":"invalid_contact","value":{"error":{"code":"invalid_contact","message":"A linked `contactId` is not visible to the caller or does not belong to the resource entity."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}},"delete":{"operationId":"deleteTask","tags":["Tasks"],"summary":"Delete a task","description":"Deletes the task and all its occurrences.\n\n**Permission:** `tasks.use` on the target entity (API keys and people: from the role).  \n**Partner scope:** `tasks:write`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)."}],"x-mlt-permissions":["tasks.use"],"x-mlt-partner-scopes":["tasks:write"],"responses":{"204":{"description":"Deleted.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `task_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"task_not_found":{"summary":"task_not_found","value":{"error":{"code":"task_not_found","message":"The task does not exist or the caller cannot see it."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/tasks/{id}/occurrences/status":{"put":{"operationId":"setTaskOccurrenceStatus","tags":["Tasks"],"summary":"Mark an occurrence as done or to do","description":"Sets the status of one occurrence (`occurrenceAt` as returned by the occurrences list). Marking it `done` sends the `task.completed` webhook.\n\n**Permission:** `tasks.use` on the target entity (API keys and people: from the role).  \n**Partner scope:** `tasks:write`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)."}],"x-mlt-permissions":["tasks.use"],"x-mlt-partner-scopes":["tasks:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetOccurrenceStatusBody"},"example":{"occurrenceAt":"2026-10-06T07:00:00.000Z","status":"done"}}}},"responses":{"204":{"description":"Updated.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"Malformed request body (not parseable). Codes: `bad_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"bad_request":{"summary":"bad_request","value":{"error":{"code":"bad_request","message":"The request body is not valid JSON (it cannot be parsed)."}}}}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `task_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"task_not_found":{"summary":"task_not_found","value":{"error":{"code":"task_not_found","message":"The task does not exist or the caller cannot see it."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`, `invalid_occurrence`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}},"invalid_occurrence":{"summary":"invalid_occurrence","value":{"error":{"code":"invalid_occurrence","message":"`occurrenceAt` is not an occurrence of the task."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/tasks/{id}/occurrences/skip":{"post":{"operationId":"skipTaskOccurrence","tags":["Tasks"],"summary":"Skip an occurrence","description":"Removes one occurrence of a recurring task (the others are kept).\n\n**Permission:** `tasks.use` on the target entity (API keys and people: from the role).  \n**Partner scope:** `tasks:write`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)."},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key of this request (e.g. a UUID), reused for its retries. For 24 hours, a retry with the same key and the same body answers the recorded response (same status and body, header `Idempotent-Replayed: true`) without running the request again; the same key with another body answers `422 idempotency_key_reused`, and while the first request is running `409 idempotency_in_progress`. A failed request releases its key. A request interrupted after it started (its outcome is unknown) is never run twice: its key answers `409 idempotency_outcome_unknown`, retry with a new key once you have checked the resource. For `multipart/form-data` uploads, the key alone identifies the request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"x-mlt-permissions":["tasks.use"],"x-mlt-partner-scopes":["tasks:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkipOccurrenceBody"},"example":{"occurrenceAt":"2026-10-13T07:00:00.000Z"}}}},"responses":{"204":{"description":"Skipped.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"Malformed request body (not parseable). Codes: `bad_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"bad_request":{"summary":"bad_request","value":{"error":{"code":"bad_request","message":"The request body is not valid JSON (it cannot be parsed)."}}}}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `task_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"task_not_found":{"summary":"task_not_found","value":{"error":{"code":"task_not_found","message":"The task does not exist or the caller cannot see it."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `idempotency_in_progress`, `idempotency_outcome_unknown`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with the same `Idempotency-Key` is still running: retry a little later."}}},"idempotency_outcome_unknown":{"summary":"idempotency_outcome_unknown","value":{"error":{"code":"idempotency_outcome_unknown","message":"The request with the same `Idempotency-Key` was interrupted and its outcome is unknown (it is never run twice): check the resource, then retry with a new key."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`, `invalid_occurrence`, `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}},"invalid_occurrence":{"summary":"invalid_occurrence","value":{"error":{"code":"invalid_occurrence","message":"`occurrenceAt` is not an occurrence of the task."}}},"idempotency_key_reused":{"summary":"idempotency_key_reused","value":{"error":{"code":"idempotency_key_reused","message":"The `Idempotency-Key` was already used (within 24 hours) for a different request: use a new key."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/signature-requests":{"get":{"operationId":"listSignatureRequests","tags":["Signature requests"],"summary":"List signature requests","description":"Signature requests visible to the caller, newest first. Filter by entity or status.\n\n**Permission:** `signature.read` on the target entity (API keys and people: from the role).  \n**Partner scope:** `signature:read`.","parameters":[{"name":"pageToken","required":false,"in":"query","schema":{"maxLength":500,"type":"string"},"description":"Cursor returned as `nextPageToken` by the previous page."},{"name":"pageSize","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"integer"},"description":"Items per page (1-100, default 25)."},{"name":"entityId","required":false,"in":"query","schema":{"format":"uuid","type":"string"},"description":"Only the requests of this entity."},{"name":"status","required":false,"in":"query","schema":{"type":"string","enum":["draft","sent","completed","declined","canceled","expired"]},"description":"Only the requests with this status."}],"x-mlt-permissions":["signature.read"],"x-mlt-partner-scopes":["signature:read"],"responses":{"200":{"description":"A page of signature requests.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/SignatureRequest"}},"nextPageToken":{"type":"string","description":"Present when there is a next page: pass it as `pageToken`."}}},"example":{"results":[{"id":"0192f3a1-7c2e-7b4d-9a61-400000000001","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","title":"Bail - Lot 12","message":"Bonjour, voici le bail du lot 12 à signer. Merci !","messageTemplate":null,"status":"sent","version":3,"vendor":"yousign","level":"SES","authMethod":"email_otp","signingOrder":"sequential","reminders":{"enabled":true,"everyDays":3,"maxCount":3},"retention":{"years":10,"action":"archive","purgeAt":null,"purgedAt":null},"document":{"name":"bail-lot-12.pdf","sizeBytes":482113,"signedAvailable":false,"purged":false},"signers":[{"id":"0192f3a1-7c2e-7b4d-9a61-400000000011","firstName":"Marie","lastName":"Durand","email":"marie.durand@example.fr","phone":null,"contactId":"0192f3a1-7c2e-7b4d-9a61-600000000001","status":"signed","position":0,"invitedAt":"2026-10-01T09:30:02.000Z","signedAt":"2026-10-01T10:12:45.000Z","declinedReason":null,"reminderCount":0,"lastRemindedAt":null},{"id":"0192f3a1-7c2e-7b4d-9a61-400000000012","firstName":"Paul","lastName":"Martin","email":"paul.martin@example.fr","phone":"+33612345678","contactId":null,"status":"pending","position":1,"invitedAt":"2026-10-01T10:12:46.000Z","signedAt":null,"declinedReason":null,"reminderCount":0,"lastRemindedAt":null}],"participants":[{"id":"0192f3a1-7c2e-7b4d-9a61-400000000011","role":"signer","location":"remote","order":1,"otpChannel":"email","firstName":"Marie","lastName":"Durand","email":"marie.durand@example.fr","phone":null,"contactId":"0192f3a1-7c2e-7b4d-9a61-600000000001","reminders":null,"status":"signed","position":0,"invitedAt":"2026-10-01T09:30:02.000Z","signedAt":"2026-10-01T10:12:45.000Z","declinedReason":null,"reminderCount":0,"lastRemindedAt":null},{"id":"0192f3a1-7c2e-7b4d-9a61-400000000012","role":"signer","location":"remote","order":2,"otpChannel":"email","firstName":"Paul","lastName":"Martin","email":"paul.martin@example.fr","phone":"+33612345678","contactId":null,"reminders":null,"status":"pending","position":1,"invitedAt":"2026-10-01T10:12:46.000Z","signedAt":null,"declinedReason":null,"reminderCount":0,"lastRemindedAt":null}],"documents":[{"id":"0190a5b8-7c1e-7a10-9d2e-6c4b3a2f1d01","name":"bail-lot-12.pdf","isAnnex":false,"linkedDocumentIds":[],"position":0,"sizeBytes":482113,"pages":[{"width":595.28,"height":841.89,"rotation":0}],"sha256":{"original":"9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08","withMentions":null,"signed":null},"signedAvailable":false}],"fields":[{"id":"0190a5b8-7c1e-7a10-9d2e-6c4b3a2f1e01","type":"signature","participantId":"0192f3a1-7c2e-7b4d-9a61-400000000011","documentId":"0190a5b8-7c1e-7a10-9d2e-6c4b3a2f1d01","page":1,"box":{"x":0.06,"y":0.886,"width":0.232,"height":0.071},"label":"Lu et approuvé","required":true,"drawing":null},{"id":"0190a5b8-7c1e-7a10-9d2e-6c4b3a2f1e02","type":"signature","participantId":"0192f3a1-7c2e-7b4d-9a61-400000000012","documentId":"0190a5b8-7c1e-7a10-9d2e-6c4b3a2f1d01","page":1,"box":{"x":0.539,"y":0.886,"width":0.232,"height":0.071},"label":"Bon pour accord","required":true,"drawing":null}],"createdBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"},"createdAt":"2026-10-01T09:30:00.000Z","sentAt":"2026-10-01T09:30:02.000Z","completedAt":null,"expiresAt":"2026-10-31T09:30:00.000Z","cancelRequestedAt":null}]}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`, `invalid_page_token`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}},"invalid_page_token":{"summary":"invalid_page_token","value":{"error":{"code":"invalid_page_token","message":"The `pageToken` is malformed or does not belong to this list."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}},"post":{"operationId":"createSignatureRequest","tags":["Signature requests"],"summary":"Create a signature request","description":"Uploads a PDF and sends it for signature. The body is `multipart/form-data` with two parts: `file` (the PDF, 15 MB max) and `data` (a JSON string, see below). Options you omit take the effective settings of the entity (`GET /v1/signature-requests/options`).\n\nSigners are invited by email (all at once, or one after the other with `signingOrder: sequential`). Follow the progress with webhooks (`signature.signed`, `signature.completed`, `signature.declined`).\n\n**Permission:** `signature.send` on the target entity (API keys and people: from the role).  \n**Partner scope:** `signature:write`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key of this request (e.g. a UUID), reused for its retries. For 24 hours, a retry with the same key and the same body answers the recorded response (same status and body, header `Idempotent-Replayed: true`) without running the request again; the same key with another body answers `422 idempotency_key_reused`, and while the first request is running `409 idempotency_in_progress`. A failed request releases its key. A request interrupted after it started (its outcome is unknown) is never run twice: its key answers `409 idempotency_outcome_unknown`, retry with a new key once you have checked the resource. For `multipart/form-data` uploads, the key alone identifies the request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"x-mlt-permissions":["signature.send"],"x-mlt-partner-scopes":["signature:write"],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file","data"],"properties":{"file":{"type":"string","format":"binary","description":"The PDF document to sign (`application/pdf`, 15 MB max)."},"data":{"type":"string","contentMediaType":"application/json","contentSchema":{"$ref":"#/components/schemas/CreateSignatureRequestData"},"description":"JSON string of the request options. Schema: `CreateSignatureRequestData`."}}},"encoding":{"data":{"contentType":"application/json"}},"example":{"data":"{\"entityId\":\"0192f3a1-7c2e-7b4d-9a61-200000000002\",\"title\":\"Bail - Lot 12\",\"message\":\"Bonjour, voici le bail du lot 12 à signer. Merci !\",\"signers\":[{\"firstName\":\"Marie\",\"lastName\":\"Durand\",\"email\":\"marie.durand@example.fr\",\"contactId\":\"0192f3a1-7c2e-7b4d-9a61-600000000001\"},{\"firstName\":\"Paul\",\"lastName\":\"Martin\",\"email\":\"paul.martin@example.fr\",\"phone\":\"+33612345678\"}],\"expiresInDays\":30,\"authMethod\":\"email_otp\",\"signingOrder\":\"sequential\"}"}}}},"responses":{"201":{"description":"The created request.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignatureRequest"},"example":{"id":"0192f3a1-7c2e-7b4d-9a61-400000000001","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","title":"Bail - Lot 12","message":"Bonjour, voici le bail du lot 12 à signer. Merci !","messageTemplate":null,"status":"sent","version":3,"vendor":"yousign","level":"SES","authMethod":"email_otp","signingOrder":"sequential","reminders":{"enabled":true,"everyDays":3,"maxCount":3},"retention":{"years":10,"action":"archive","purgeAt":null,"purgedAt":null},"document":{"name":"bail-lot-12.pdf","sizeBytes":482113,"signedAvailable":false,"purged":false},"signers":[{"id":"0192f3a1-7c2e-7b4d-9a61-400000000011","firstName":"Marie","lastName":"Durand","email":"marie.durand@example.fr","phone":null,"contactId":"0192f3a1-7c2e-7b4d-9a61-600000000001","status":"signed","position":0,"invitedAt":"2026-10-01T09:30:02.000Z","signedAt":"2026-10-01T10:12:45.000Z","declinedReason":null,"reminderCount":0,"lastRemindedAt":null},{"id":"0192f3a1-7c2e-7b4d-9a61-400000000012","firstName":"Paul","lastName":"Martin","email":"paul.martin@example.fr","phone":"+33612345678","contactId":null,"status":"pending","position":1,"invitedAt":"2026-10-01T10:12:46.000Z","signedAt":null,"declinedReason":null,"reminderCount":0,"lastRemindedAt":null}],"participants":[{"id":"0192f3a1-7c2e-7b4d-9a61-400000000011","role":"signer","location":"remote","order":1,"otpChannel":"email","firstName":"Marie","lastName":"Durand","email":"marie.durand@example.fr","phone":null,"contactId":"0192f3a1-7c2e-7b4d-9a61-600000000001","reminders":null,"status":"signed","position":0,"invitedAt":"2026-10-01T09:30:02.000Z","signedAt":"2026-10-01T10:12:45.000Z","declinedReason":null,"reminderCount":0,"lastRemindedAt":null},{"id":"0192f3a1-7c2e-7b4d-9a61-400000000012","role":"signer","location":"remote","order":2,"otpChannel":"email","firstName":"Paul","lastName":"Martin","email":"paul.martin@example.fr","phone":"+33612345678","contactId":null,"reminders":null,"status":"pending","position":1,"invitedAt":"2026-10-01T10:12:46.000Z","signedAt":null,"declinedReason":null,"reminderCount":0,"lastRemindedAt":null}],"documents":[{"id":"0190a5b8-7c1e-7a10-9d2e-6c4b3a2f1d01","name":"bail-lot-12.pdf","isAnnex":false,"linkedDocumentIds":[],"position":0,"sizeBytes":482113,"pages":[{"width":595.28,"height":841.89,"rotation":0}],"sha256":{"original":"9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08","withMentions":null,"signed":null},"signedAvailable":false}],"fields":[{"id":"0190a5b8-7c1e-7a10-9d2e-6c4b3a2f1e01","type":"signature","participantId":"0192f3a1-7c2e-7b4d-9a61-400000000011","documentId":"0190a5b8-7c1e-7a10-9d2e-6c4b3a2f1d01","page":1,"box":{"x":0.06,"y":0.886,"width":0.232,"height":0.071},"label":"Lu et approuvé","required":true,"drawing":null},{"id":"0190a5b8-7c1e-7a10-9d2e-6c4b3a2f1e02","type":"signature","participantId":"0192f3a1-7c2e-7b4d-9a61-400000000012","documentId":"0190a5b8-7c1e-7a10-9d2e-6c4b3a2f1d01","page":1,"box":{"x":0.539,"y":0.886,"width":0.232,"height":0.071},"label":"Bon pour accord","required":true,"drawing":null}],"createdBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"},"createdAt":"2026-10-01T09:30:00.000Z","sentAt":"2026-10-01T09:30:02.000Z","completedAt":null,"expiresAt":"2026-10-31T09:30:00.000Z","cancelRequestedAt":null}}}},"400":{"description":"Malformed request body (not parseable). Codes: `bad_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"bad_request":{"summary":"bad_request","value":{"error":{"code":"bad_request","message":"The request body is not valid JSON (it cannot be parsed)."}}}}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`, `feature_disabled`, `quota_exceeded`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}},"feature_disabled":{"summary":"feature_disabled","value":{"error":{"code":"feature_disabled","message":"The feature (signature, registered mail, tasks) is not enabled for this entity."}}},"quota_exceeded":{"summary":"quota_exceeded","value":{"error":{"code":"quota_exceeded","message":"The quota of the organization or entity is reached and set to block (see the `options` endpoints)."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `entity_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"entity_not_found":{"summary":"entity_not_found","value":{"error":{"code":"entity_not_found","message":"The entity does not exist or the caller has no access to it."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `idempotency_in_progress`, `idempotency_outcome_unknown`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with the same `Idempotency-Key` is still running: retry a little later."}}},"idempotency_outcome_unknown":{"summary":"idempotency_outcome_unknown","value":{"error":{"code":"idempotency_outcome_unknown","message":"The request with the same `Idempotency-Key` was interrupted and its outcome is unknown (it is never run twice): check the resource, then retry with a new key."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`, `file_required`, `file_too_large`, `invalid_pdf`, `duplicate_signer_email`, `expiry_too_long`, `vendor_not_allowed`, `eidas_level_not_allowed`, `auth_method_not_allowed`, `signer_phone_required`, `external_signers_not_allowed`, `invalid_contact`, `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}},"file_required":{"summary":"file_required","value":{"error":{"code":"file_required","message":"The multipart `file` part is missing."}}},"file_too_large":{"summary":"file_too_large","value":{"error":{"code":"file_too_large","message":"The PDF exceeds 15 MB."}}},"invalid_pdf":{"summary":"invalid_pdf","value":{"error":{"code":"invalid_pdf","message":"The file is not a readable PDF."}}},"duplicate_signer_email":{"summary":"duplicate_signer_email","value":{"error":{"code":"duplicate_signer_email","message":"Two signers have the same email address."}}},"expiry_too_long":{"summary":"expiry_too_long","value":{"error":{"code":"expiry_too_long","message":"`expiresInDays` is above the maximum allowed by the entity settings."}}},"vendor_not_allowed":{"summary":"vendor_not_allowed","value":{"error":{"code":"vendor_not_allowed","message":"The vendor is not allowed by the entity settings (also used by registered mail)."}}},"eidas_level_not_allowed":{"summary":"eidas_level_not_allowed","value":{"error":{"code":"eidas_level_not_allowed","message":"The eIDAS level is not allowed by the entity settings."}}},"auth_method_not_allowed":{"summary":"auth_method_not_allowed","value":{"error":{"code":"auth_method_not_allowed","message":"The signer authentication method is not allowed (or weaker than the required one)."}}},"signer_phone_required":{"summary":"signer_phone_required","value":{"error":{"code":"signer_phone_required","message":"A phone number (E.164) is required for `sms_otp` authentication."}}},"external_signers_not_allowed":{"summary":"external_signers_not_allowed","value":{"error":{"code":"external_signers_not_allowed","message":"The entity only allows signers from the organization."}}},"invalid_contact":{"summary":"invalid_contact","value":{"error":{"code":"invalid_contact","message":"A linked `contactId` is not visible to the caller or does not belong to the resource entity."}}},"idempotency_key_reused":{"summary":"idempotency_key_reused","value":{"error":{"code":"idempotency_key_reused","message":"The `Idempotency-Key` was already used (within 24 hours) for a different request: use a new key."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/signature-requests/options":{"get":{"operationId":"getSignatureOptions","tags":["Signature requests"],"summary":"Retrieve the signature options of an entity","description":"Effective settings a new request may use in this entity (vendors, eIDAS levels, signer authentication, expiry, signing order) and the remaining quota.\n\n**Permission:** `signature.send` on the target entity (API keys and people: from the role).  \n**Partner scope:** `signature:write`.","parameters":[{"name":"entityId","required":true,"in":"query","schema":{"format":"uuid","type":"string"},"description":"Entity id (see `GET /v1/me` → `scopes[].entityId`)."}],"x-mlt-permissions":["signature.send"],"x-mlt-partner-scopes":["signature:write"],"responses":{"200":{"description":"Effective options.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignatureOptions"},"example":{"entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","vendors":{"allowed":[{"key":"yousign","available":true,"capabilities":{"levels":["SES"],"authMethods":["email_otp","sms_otp"],"otpChannels":["sms"],"ordering":true,"groups":true,"maxSigners":100,"maxDocuments":50,"maxFileBytes":52428800,"otp":{"ttlSeconds":600,"maxAttempts":5,"maxSends":5,"minResendSeconds":15},"fieldBox":{"minWidth":85,"maxWidth":2000,"minHeight":37,"maxHeight":1000}}}],"default":"yousign"},"levels":{"allowed":["SES","AES"],"default":"SES","supportedByVendor":["SES"]},"authMethods":{"allowed":["email_otp","sms_otp"],"default":"email_otp","imposed":false},"expiry":{"defaultDays":30,"maxDays":90},"signingOrder":{"mode":"sender_choice","default":"parallel"},"externalSignersAllowed":true,"notariesEnabled":true,"reminders":{"enabled":true,"everyDays":3,"maxCount":3},"retention":{"signedDocumentsYears":10,"afterExpiry":"archive"},"quota":{"limit":200,"used":37,"remaining":163,"behavior":"block","blocked":false}}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`, `feature_disabled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}},"feature_disabled":{"summary":"feature_disabled","value":{"error":{"code":"feature_disabled","message":"The feature (signature, registered mail, tasks) is not enabled for this entity."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `entity_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"entity_not_found":{"summary":"entity_not_found","value":{"error":{"code":"entity_not_found","message":"The entity does not exist or the caller has no access to it."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/signature-requests/{id}":{"get":{"operationId":"getSignatureRequest","tags":["Signature requests"],"summary":"Retrieve a signature request","description":"The request with its signers and their status.\n\n**Permission:** `signature.read` on the target entity (API keys and people: from the role).  \n**Partner scope:** `signature:read`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)."}],"x-mlt-permissions":["signature.read"],"x-mlt-partner-scopes":["signature:read"],"responses":{"200":{"description":"The signature request.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignatureRequest"},"example":{"id":"0192f3a1-7c2e-7b4d-9a61-400000000001","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","title":"Bail - Lot 12","message":"Bonjour, voici le bail du lot 12 à signer. Merci !","messageTemplate":null,"status":"sent","version":3,"vendor":"yousign","level":"SES","authMethod":"email_otp","signingOrder":"sequential","reminders":{"enabled":true,"everyDays":3,"maxCount":3},"retention":{"years":10,"action":"archive","purgeAt":null,"purgedAt":null},"document":{"name":"bail-lot-12.pdf","sizeBytes":482113,"signedAvailable":false,"purged":false},"signers":[{"id":"0192f3a1-7c2e-7b4d-9a61-400000000011","firstName":"Marie","lastName":"Durand","email":"marie.durand@example.fr","phone":null,"contactId":"0192f3a1-7c2e-7b4d-9a61-600000000001","status":"signed","position":0,"invitedAt":"2026-10-01T09:30:02.000Z","signedAt":"2026-10-01T10:12:45.000Z","declinedReason":null,"reminderCount":0,"lastRemindedAt":null},{"id":"0192f3a1-7c2e-7b4d-9a61-400000000012","firstName":"Paul","lastName":"Martin","email":"paul.martin@example.fr","phone":"+33612345678","contactId":null,"status":"pending","position":1,"invitedAt":"2026-10-01T10:12:46.000Z","signedAt":null,"declinedReason":null,"reminderCount":0,"lastRemindedAt":null}],"participants":[{"id":"0192f3a1-7c2e-7b4d-9a61-400000000011","role":"signer","location":"remote","order":1,"otpChannel":"email","firstName":"Marie","lastName":"Durand","email":"marie.durand@example.fr","phone":null,"contactId":"0192f3a1-7c2e-7b4d-9a61-600000000001","reminders":null,"status":"signed","position":0,"invitedAt":"2026-10-01T09:30:02.000Z","signedAt":"2026-10-01T10:12:45.000Z","declinedReason":null,"reminderCount":0,"lastRemindedAt":null},{"id":"0192f3a1-7c2e-7b4d-9a61-400000000012","role":"signer","location":"remote","order":2,"otpChannel":"email","firstName":"Paul","lastName":"Martin","email":"paul.martin@example.fr","phone":"+33612345678","contactId":null,"reminders":null,"status":"pending","position":1,"invitedAt":"2026-10-01T10:12:46.000Z","signedAt":null,"declinedReason":null,"reminderCount":0,"lastRemindedAt":null}],"documents":[{"id":"0190a5b8-7c1e-7a10-9d2e-6c4b3a2f1d01","name":"bail-lot-12.pdf","isAnnex":false,"linkedDocumentIds":[],"position":0,"sizeBytes":482113,"pages":[{"width":595.28,"height":841.89,"rotation":0}],"sha256":{"original":"9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08","withMentions":null,"signed":null},"signedAvailable":false}],"fields":[{"id":"0190a5b8-7c1e-7a10-9d2e-6c4b3a2f1e01","type":"signature","participantId":"0192f3a1-7c2e-7b4d-9a61-400000000011","documentId":"0190a5b8-7c1e-7a10-9d2e-6c4b3a2f1d01","page":1,"box":{"x":0.06,"y":0.886,"width":0.232,"height":0.071},"label":"Lu et approuvé","required":true,"drawing":null},{"id":"0190a5b8-7c1e-7a10-9d2e-6c4b3a2f1e02","type":"signature","participantId":"0192f3a1-7c2e-7b4d-9a61-400000000012","documentId":"0190a5b8-7c1e-7a10-9d2e-6c4b3a2f1d01","page":1,"box":{"x":0.539,"y":0.886,"width":0.232,"height":0.071},"label":"Bon pour accord","required":true,"drawing":null}],"createdBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"},"createdAt":"2026-10-01T09:30:00.000Z","sentAt":"2026-10-01T09:30:02.000Z","completedAt":null,"expiresAt":"2026-10-31T09:30:00.000Z","cancelRequestedAt":null}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `signature_request_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"signature_request_not_found":{"summary":"signature_request_not_found","value":{"error":{"code":"signature_request_not_found","message":"The signature request does not exist or the caller cannot see it."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/signature-requests/{id}/cancel":{"post":{"operationId":"cancelSignatureRequest","tags":["Signature requests"],"summary":"Cancel a signature request","description":"Cancels a request that is `sent`. Pending signers can no longer sign. The request keeps its status with `cancelRequestedAt` set until the signature vendor confirms the cancellation, then becomes `canceled`. Allowed to the sender (still holding `signature.send`) and to `signature.manage`.\n\n**Permission:** `signature.send` or `signature.manage` on the target entity (API keys and people: from the role).  \n**Partner scope:** `signature:write`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)."},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key of this request (e.g. a UUID), reused for its retries. For 24 hours, a retry with the same key and the same body answers the recorded response (same status and body, header `Idempotent-Replayed: true`) without running the request again; the same key with another body answers `422 idempotency_key_reused`, and while the first request is running `409 idempotency_in_progress`. A failed request releases its key. A request interrupted after it started (its outcome is unknown) is never run twice: its key answers `409 idempotency_outcome_unknown`, retry with a new key once you have checked the resource. For `multipart/form-data` uploads, the key alone identifies the request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"x-mlt-permissions":["signature.send","signature.manage"],"x-mlt-partner-scopes":["signature:write"],"responses":{"200":{"description":"The request, cancellation requested.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignatureRequest"},"example":{"id":"0192f3a1-7c2e-7b4d-9a61-400000000001","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","title":"Bail - Lot 12","message":"Bonjour, voici le bail du lot 12 à signer. Merci !","messageTemplate":null,"status":"sent","version":3,"vendor":"yousign","level":"SES","authMethod":"email_otp","signingOrder":"sequential","reminders":{"enabled":true,"everyDays":3,"maxCount":3},"retention":{"years":10,"action":"archive","purgeAt":null,"purgedAt":null},"document":{"name":"bail-lot-12.pdf","sizeBytes":482113,"signedAvailable":false,"purged":false},"signers":[{"id":"0192f3a1-7c2e-7b4d-9a61-400000000011","firstName":"Marie","lastName":"Durand","email":"marie.durand@example.fr","phone":null,"contactId":"0192f3a1-7c2e-7b4d-9a61-600000000001","status":"signed","position":0,"invitedAt":"2026-10-01T09:30:02.000Z","signedAt":"2026-10-01T10:12:45.000Z","declinedReason":null,"reminderCount":0,"lastRemindedAt":null},{"id":"0192f3a1-7c2e-7b4d-9a61-400000000012","firstName":"Paul","lastName":"Martin","email":"paul.martin@example.fr","phone":"+33612345678","contactId":null,"status":"pending","position":1,"invitedAt":"2026-10-01T10:12:46.000Z","signedAt":null,"declinedReason":null,"reminderCount":0,"lastRemindedAt":null}],"participants":[{"id":"0192f3a1-7c2e-7b4d-9a61-400000000011","role":"signer","location":"remote","order":1,"otpChannel":"email","firstName":"Marie","lastName":"Durand","email":"marie.durand@example.fr","phone":null,"contactId":"0192f3a1-7c2e-7b4d-9a61-600000000001","reminders":null,"status":"signed","position":0,"invitedAt":"2026-10-01T09:30:02.000Z","signedAt":"2026-10-01T10:12:45.000Z","declinedReason":null,"reminderCount":0,"lastRemindedAt":null},{"id":"0192f3a1-7c2e-7b4d-9a61-400000000012","role":"signer","location":"remote","order":2,"otpChannel":"email","firstName":"Paul","lastName":"Martin","email":"paul.martin@example.fr","phone":"+33612345678","contactId":null,"reminders":null,"status":"pending","position":1,"invitedAt":"2026-10-01T10:12:46.000Z","signedAt":null,"declinedReason":null,"reminderCount":0,"lastRemindedAt":null}],"documents":[{"id":"0190a5b8-7c1e-7a10-9d2e-6c4b3a2f1d01","name":"bail-lot-12.pdf","isAnnex":false,"linkedDocumentIds":[],"position":0,"sizeBytes":482113,"pages":[{"width":595.28,"height":841.89,"rotation":0}],"sha256":{"original":"9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08","withMentions":null,"signed":null},"signedAvailable":false}],"fields":[{"id":"0190a5b8-7c1e-7a10-9d2e-6c4b3a2f1e01","type":"signature","participantId":"0192f3a1-7c2e-7b4d-9a61-400000000011","documentId":"0190a5b8-7c1e-7a10-9d2e-6c4b3a2f1d01","page":1,"box":{"x":0.06,"y":0.886,"width":0.232,"height":0.071},"label":"Lu et approuvé","required":true,"drawing":null},{"id":"0190a5b8-7c1e-7a10-9d2e-6c4b3a2f1e02","type":"signature","participantId":"0192f3a1-7c2e-7b4d-9a61-400000000012","documentId":"0190a5b8-7c1e-7a10-9d2e-6c4b3a2f1d01","page":1,"box":{"x":0.539,"y":0.886,"width":0.232,"height":0.071},"label":"Bon pour accord","required":true,"drawing":null}],"createdBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"},"createdAt":"2026-10-01T09:30:00.000Z","sentAt":"2026-10-01T09:30:02.000Z","completedAt":null,"expiresAt":"2026-10-31T09:30:00.000Z","cancelRequestedAt":"2026-10-02T08:00:00.000Z"}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `signature_request_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"signature_request_not_found":{"summary":"signature_request_not_found","value":{"error":{"code":"signature_request_not_found","message":"The signature request does not exist or the caller cannot see it."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `signature_request_not_cancelable`, `idempotency_in_progress`, `idempotency_outcome_unknown`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"signature_request_not_cancelable":{"summary":"signature_request_not_cancelable","value":{"error":{"code":"signature_request_not_cancelable","message":"Only requests waiting for signatures can be canceled."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with the same `Idempotency-Key` is still running: retry a little later."}}},"idempotency_outcome_unknown":{"summary":"idempotency_outcome_unknown","value":{"error":{"code":"idempotency_outcome_unknown","message":"The request with the same `Idempotency-Key` was interrupted and its outcome is unknown (it is never run twice): check the resource, then retry with a new key."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_key_reused":{"summary":"idempotency_key_reused","value":{"error":{"code":"idempotency_key_reused","message":"The `Idempotency-Key` was already used (within 24 hours) for a different request: use a new key."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/signature-requests/{id}/remind":{"post":{"operationId":"remindSignatureRequest","tags":["Signature requests"],"summary":"Remind the pending signers","description":"Sends a reminder email now to the signers who were invited and have not signed yet. Automatic reminders follow the entity settings (`reminders`).\n\n**Permission:** `signature.send` or `signature.manage` on the target entity (API keys and people: from the role).  \n**Partner scope:** `signature:write`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)."},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key of this request (e.g. a UUID), reused for its retries. For 24 hours, a retry with the same key and the same body answers the recorded response (same status and body, header `Idempotent-Replayed: true`) without running the request again; the same key with another body answers `422 idempotency_key_reused`, and while the first request is running `409 idempotency_in_progress`. A failed request releases its key. A request interrupted after it started (its outcome is unknown) is never run twice: its key answers `409 idempotency_outcome_unknown`, retry with a new key once you have checked the resource. For `multipart/form-data` uploads, the key alone identifies the request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"x-mlt-permissions":["signature.send","signature.manage"],"x-mlt-partner-scopes":["signature:write"],"responses":{"204":{"description":"Reminders sent.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `signature_request_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"signature_request_not_found":{"summary":"signature_request_not_found","value":{"error":{"code":"signature_request_not_found","message":"The signature request does not exist or the caller cannot see it."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `signature_request_completed`, `signature_request_declined`, `signature_request_canceled`, `signature_request_expired`, `idempotency_in_progress`, `idempotency_outcome_unknown`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"signature_request_completed":{"summary":"signature_request_completed","value":{"error":{"code":"signature_request_completed","message":"The request is already completed."}}},"signature_request_declined":{"summary":"signature_request_declined","value":{"error":{"code":"signature_request_declined","message":"The request was declined by a signer."}}},"signature_request_canceled":{"summary":"signature_request_canceled","value":{"error":{"code":"signature_request_canceled","message":"The request was canceled."}}},"signature_request_expired":{"summary":"signature_request_expired","value":{"error":{"code":"signature_request_expired","message":"The request expired."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with the same `Idempotency-Key` is still running: retry a little later."}}},"idempotency_outcome_unknown":{"summary":"idempotency_outcome_unknown","value":{"error":{"code":"idempotency_outcome_unknown","message":"The request with the same `Idempotency-Key` was interrupted and its outcome is unknown (it is never run twice): check the resource, then retry with a new key."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_key_reused":{"summary":"idempotency_key_reused","value":{"error":{"code":"idempotency_key_reused","message":"The `Idempotency-Key` was already used (within 24 hours) for a different request: use a new key."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/signature-requests/{id}/document":{"get":{"operationId":"downloadSignatureDocument","tags":["Signature requests"],"summary":"Download the document","description":"Downloads the original PDF, or the signed PDF (`variant=signed`, sealed by the signature vendor) once the request is `completed`.\n\n**Permission:** `signature.read` on the target entity (API keys and people: from the role).  \n**Partner scope:** `signature:read`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)."},{"name":"variant","required":false,"in":"query","schema":{"default":"original","type":"string","enum":["original","signed"]},"description":"`original` (default) or `signed`."}],"x-mlt-permissions":["signature.read"],"x-mlt-partner-scopes":["signature:read"],"responses":{"200":{"description":"The PDF (`Content-Disposition: attachment`).","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `signature_request_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"signature_request_not_found":{"summary":"signature_request_not_found","value":{"error":{"code":"signature_request_not_found","message":"The signature request does not exist or the caller cannot see it."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `signature_request_not_completed`, `signed_document_not_available`, `document_purged`, `document_archived`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"signature_request_not_completed":{"summary":"signature_request_not_completed","value":{"error":{"code":"signature_request_not_completed","message":"The signed document exists only once the request is completed."}}},"signed_document_not_available":{"summary":"signed_document_not_available","value":{"error":{"code":"signed_document_not_available","message":"The signed document is not available yet."}}},"document_purged":{"summary":"document_purged","value":{"error":{"code":"document_purged","message":"The document was deleted by the retention policy (metadata and proof are kept)."}}},"document_archived":{"summary":"document_archived","value":{"error":{"code":"document_archived","message":"The document was archived by the retention policy."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/contacts":{"get":{"operationId":"listContacts","tags":["Contacts"],"summary":"List contacts","description":"Contacts of an entity visible to the caller (shared contacts, and the caller’s own private contacts).\n\n**Permission:** `contacts.read` on the target entity (API keys and people: from the role).  \n**Partner scope:** `contacts:read`.","parameters":[{"name":"pageToken","required":false,"in":"query","schema":{"maxLength":500,"type":"string"},"description":"Cursor returned as `nextPageToken` by the previous page."},{"name":"pageSize","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"integer"},"description":"Items per page (1-100, default 25)."},{"name":"entityId","required":true,"in":"query","schema":{"format":"uuid","type":"string"},"description":"Entity id (see `GET /v1/me` → `scopes[].entityId`)."},{"name":"q","required":false,"in":"query","schema":{"maxLength":200,"type":"string"},"description":"Full-text search: name, company, email, phone, SIREN/SIRET, tags (accent and case insensitive)."},{"name":"kind","required":false,"in":"query","schema":{"type":"string","enum":["person","company"]},"description":"`person` or `company`."},{"name":"tag","required":false,"in":"query","schema":{"minLength":1,"maxLength":40,"type":"string"},"description":"Only the contacts with this tag."},{"name":"visibility","required":false,"in":"query","schema":{"default":"all","type":"string","enum":["all","shared","private"]},"description":"`all` (default), `shared` or `private`."},{"name":"createdByMe","required":false,"in":"query","schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"description":"`true`: only the contacts created by the caller."},{"name":"companyId","required":false,"in":"query","schema":{"format":"uuid","type":"string"},"description":"Only the persons linked to this company."},{"name":"sort","required":false,"in":"query","schema":{"default":"name","type":"string","enum":["name","updated"]},"description":"`name` (default) or `updated` (most recently updated first)."}],"x-mlt-permissions":["contacts.read"],"x-mlt-partner-scopes":["contacts:read"],"responses":{"200":{"description":"A page of contacts.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"nextPageToken":{"type":"string","description":"Present when there is a next page: pass it as `pageToken`."}}},"example":{"results":[{"id":"0192f3a1-7c2e-7b4d-9a61-600000000001","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","kind":"person","displayName":"Marie Durand","civility":"mrs","firstName":"Marie","lastName":"Durand","companyName":null,"company":{"id":"0192f3a1-7c2e-7b4d-9a61-600000000002","kind":"company","displayName":"SCI Les Tilleuls"},"jobTitle":"Gérante","siren":null,"siret":null,"email":"marie.durand@example.fr","otherEmails":[],"mobilePhone":"+33612345678","phone":null,"address":{"line1":"12 rue Vendôme","line2":null,"postalCode":"69006","city":"Lyon","country":"FR"},"recipientStatus":"individual","tags":["locataire","lot-12"],"notes":null,"externalRef":"CRM-00421","isPrivate":false,"createdBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"},"updatedBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"},"createdAt":"2026-09-20T10:00:00.000Z","updatedAt":"2026-09-28T16:42:00.000Z","access":{"canEdit":true,"canDelete":false}}],"nextPageToken":"eyJrIjoiRHVyYW5kIE1hcmllIn0"}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `entity_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"entity_not_found":{"summary":"entity_not_found","value":{"error":{"code":"entity_not_found","message":"The entity does not exist or the caller has no access to it."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`, `invalid_page_token`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}},"invalid_page_token":{"summary":"invalid_page_token","value":{"error":{"code":"invalid_page_token","message":"The `pageToken` is malformed or does not belong to this list."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}},"post":{"operationId":"createContact","tags":["Contacts"],"summary":"Create a contact","description":"Creates a person or a company. Phone numbers are normalized to E.164 (French numbers without prefix are accepted) and SIREN/SIRET are checked. Check for duplicates first with `GET /v1/contacts/duplicates`.\n\n**Permission:** `contacts.write` on the target entity (API keys and people: from the role).  \n**Partner scope:** `contacts:write`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key of this request (e.g. a UUID), reused for its retries. For 24 hours, a retry with the same key and the same body answers the recorded response (same status and body, header `Idempotent-Replayed: true`) without running the request again; the same key with another body answers `422 idempotency_key_reused`, and while the first request is running `409 idempotency_in_progress`. A failed request releases its key. A request interrupted after it started (its outcome is unknown) is never run twice: its key answers `409 idempotency_outcome_unknown`, retry with a new key once you have checked the resource. For `multipart/form-data` uploads, the key alone identifies the request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"x-mlt-permissions":["contacts.write"],"x-mlt-partner-scopes":["contacts:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContactBody"},"example":{"entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","kind":"person","civility":"mrs","firstName":"Marie","lastName":"Durand","companyId":"0192f3a1-7c2e-7b4d-9a61-600000000002","jobTitle":"Gérante","email":"marie.durand@example.fr","mobilePhone":"06 12 34 56 78","address":{"line1":"12 rue Vendôme","postalCode":"69006","city":"Lyon","country":"FR"},"recipientStatus":"individual","tags":["locataire","lot-12"],"externalRef":"CRM-00421"}}}},"responses":{"201":{"description":"The created contact.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactDetail"},"example":{"id":"0192f3a1-7c2e-7b4d-9a61-600000000001","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","kind":"person","displayName":"Marie Durand","civility":"mrs","firstName":"Marie","lastName":"Durand","companyName":null,"company":{"id":"0192f3a1-7c2e-7b4d-9a61-600000000002","kind":"company","displayName":"SCI Les Tilleuls"},"jobTitle":"Gérante","siren":null,"siret":null,"email":"marie.durand@example.fr","otherEmails":[],"mobilePhone":"+33612345678","phone":null,"address":{"line1":"12 rue Vendôme","line2":null,"postalCode":"69006","city":"Lyon","country":"FR"},"recipientStatus":"individual","tags":["locataire","lot-12"],"notes":null,"externalRef":"CRM-00421","isPrivate":false,"createdBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"},"updatedBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"},"createdAt":"2026-09-20T10:00:00.000Z","updatedAt":"2026-09-28T16:42:00.000Z","access":{"canEdit":true,"canDelete":false},"people":[],"version":3}}}},"400":{"description":"Malformed request body (not parseable). Codes: `bad_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"bad_request":{"summary":"bad_request","value":{"error":{"code":"bad_request","message":"The request body is not valid JSON (it cannot be parsed)."}}}}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `entity_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"entity_not_found":{"summary":"entity_not_found","value":{"error":{"code":"entity_not_found","message":"The entity does not exist or the caller has no access to it."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `idempotency_in_progress`, `idempotency_outcome_unknown`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with the same `Idempotency-Key` is still running: retry a little later."}}},"idempotency_outcome_unknown":{"summary":"idempotency_outcome_unknown","value":{"error":{"code":"idempotency_outcome_unknown","message":"The request with the same `Idempotency-Key` was interrupted and its outcome is unknown (it is never run twice): check the resource, then retry with a new key."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`, `contact_name_required`, `company_name_required`, `invalid_company`, `company_link_person_only`, `invalid_phone`, `invalid_mobile_phone`, `invalid_siren`, `invalid_siret`, `siren_siret_mismatch`, `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}},"contact_name_required":{"summary":"contact_name_required","value":{"error":{"code":"contact_name_required","message":"A person needs a first name or a last name."}}},"company_name_required":{"summary":"company_name_required","value":{"error":{"code":"company_name_required","message":"A company needs a name."}}},"invalid_company":{"summary":"invalid_company","value":{"error":{"code":"invalid_company","message":"`companyId` is not a visible company contact of the same entity."}}},"company_link_person_only":{"summary":"company_link_person_only","value":{"error":{"code":"company_link_person_only","message":"Only persons can be linked to a company."}}},"invalid_phone":{"summary":"invalid_phone","value":{"error":{"code":"invalid_phone","message":"`phone` is not a valid phone number."}}},"invalid_mobile_phone":{"summary":"invalid_mobile_phone","value":{"error":{"code":"invalid_mobile_phone","message":"`mobilePhone` is not a valid phone number."}}},"invalid_siren":{"summary":"invalid_siren","value":{"error":{"code":"invalid_siren","message":"Invalid SIREN (9 digits, Luhn checksum)."}}},"invalid_siret":{"summary":"invalid_siret","value":{"error":{"code":"invalid_siret","message":"Invalid SIRET (14 digits, Luhn checksum)."}}},"siren_siret_mismatch":{"summary":"siren_siret_mismatch","value":{"error":{"code":"siren_siret_mismatch","message":"The SIRET does not start with the SIREN."}}},"idempotency_key_reused":{"summary":"idempotency_key_reused","value":{"error":{"code":"idempotency_key_reused","message":"The `Idempotency-Key` was already used (within 24 hours) for a different request: use a new key."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/contacts/duplicates":{"get":{"operationId":"findContactDuplicates","tags":["Contacts"],"summary":"Find possible duplicates","description":"Contacts of the entity that match the given email, SIRET or name. Use it before creating a contact.\n\n**Permission:** `contacts.read` on the target entity (API keys and people: from the role).  \n**Partner scope:** `contacts:read`.","parameters":[{"name":"entityId","required":true,"in":"query","schema":{"format":"uuid","type":"string"},"description":"Entity id (see `GET /v1/me` → `scopes[].entityId`)."},{"name":"kind","required":false,"in":"query","schema":{"type":"string","enum":["person","company"]}},{"name":"email","required":false,"in":"query","schema":{"maxLength":254,"type":"string"}},{"name":"siret","required":false,"in":"query","schema":{"maxLength":20,"type":"string"}},{"name":"firstName","required":false,"in":"query","schema":{"maxLength":100,"type":"string"}},{"name":"lastName","required":false,"in":"query","schema":{"maxLength":100,"type":"string"}},{"name":"companyName","required":false,"in":"query","schema":{"maxLength":200,"type":"string"}},{"name":"excludeId","required":false,"in":"query","schema":{"format":"uuid","type":"string"},"description":"Contact being edited (never reported as its own duplicate)."}],"x-mlt-permissions":["contacts.read"],"x-mlt-partner-scopes":["contacts:read"],"responses":{"200":{"description":"Matches with the reasons.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/DuplicateMatch"}},"nextPageToken":{"type":"string","description":"Present when there is a next page: pass it as `pageToken`."}}},"example":{"results":[{"contact":{"id":"0192f3a1-7c2e-7b4d-9a61-600000000001","kind":"person","displayName":"Marie Durand","email":"marie.durand@example.fr","companyName":null},"reasons":["email","name"]}]}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `entity_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"entity_not_found":{"summary":"entity_not_found","value":{"error":{"code":"entity_not_found","message":"The entity does not exist or the caller has no access to it."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/contacts/tags":{"get":{"operationId":"listContactTags","tags":["Contacts"],"summary":"List contact tags","description":"Tags used in the entity, with the number of visible contacts carrying each.\n\n**Permission:** `contacts.read` on the target entity (API keys and people: from the role).  \n**Partner scope:** `contacts:read`.","parameters":[{"name":"entityId","required":true,"in":"query","schema":{"format":"uuid","type":"string"},"description":"Entity id (see `GET /v1/me` → `scopes[].entityId`)."}],"x-mlt-permissions":["contacts.read"],"x-mlt-partner-scopes":["contacts:read"],"responses":{"200":{"description":"Tags.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/ContactTag"}},"nextPageToken":{"type":"string","description":"Present when there is a next page: pass it as `pageToken`."}}},"example":{"results":[{"name":"locataire","count":84},{"name":"lot-12","count":2}]}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `entity_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"entity_not_found":{"summary":"entity_not_found","value":{"error":{"code":"entity_not_found","message":"The entity does not exist or the caller has no access to it."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/contacts/company-lookup":{"get":{"operationId":"lookupCompany","tags":["Contacts"],"summary":"Search the French business registry","description":"Searches companies in the French business registry (SIRENE) by name, SIREN or SIRET, to prefill a company contact. Requires `contacts.write` somewhere.\n\n**Permission:** `contacts.write` on the target entity (API keys and people: from the role).  \n**Partner scope:** `contacts:write`.","parameters":[{"name":"q","required":true,"in":"query","schema":{"minLength":2,"maxLength":100,"type":"string"},"description":"Name, SIREN or SIRET (2-100 characters)."}],"x-mlt-permissions":["contacts.write"],"x-mlt-partner-scopes":["contacts:write"],"responses":{"200":{"description":"Companies (head office address).","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/CompanySuggestion"}},"nextPageToken":{"type":"string","description":"Present when there is a next page: pass it as `pageToken`."}}},"example":{"results":[{"siren":"912345678","siret":"91234567800015","name":"SCI LES TILLEULS","legalForm":"Société civile immobilière","nafCode":"68.20B","active":true,"address":{"line1":"4 place Bellecour","line2":null,"postalCode":"69002","city":"Lyon","country":"FR"}}]}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/contacts/export":{"get":{"operationId":"exportContacts","tags":["Contacts"],"summary":"Export contacts (CSV)","description":"Exports the contacts matching the filters as a UTF-8 CSV file. Requires `contacts.read` and `contacts.manage`.\n\n**Permission:** `contacts.read` and `contacts.manage` on the target entity (API keys and people: from the role).  \n**Partner scope:** `contacts:write`.","parameters":[{"name":"entityId","required":true,"in":"query","schema":{"format":"uuid","type":"string"},"description":"Entity id (see `GET /v1/me` → `scopes[].entityId`)."},{"name":"q","required":false,"in":"query","schema":{"maxLength":200,"type":"string"}},{"name":"kind","required":false,"in":"query","schema":{"type":"string","enum":["person","company"]}},{"name":"tag","required":false,"in":"query","schema":{"minLength":1,"maxLength":40,"type":"string"}},{"name":"visibility","required":false,"in":"query","schema":{"default":"all","type":"string","enum":["all","shared","private"]}},{"name":"createdByMe","required":false,"in":"query","schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"name":"companyId","required":false,"in":"query","schema":{"format":"uuid","type":"string"}}],"x-mlt-permissions":["contacts.read","contacts.manage"],"x-mlt-permissions-mode":"all","x-mlt-partner-scopes":["contacts:write"],"responses":{"200":{"description":"The CSV file (`Content-Disposition: attachment`).","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `entity_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"entity_not_found":{"summary":"entity_not_found","value":{"error":{"code":"entity_not_found","message":"The entity does not exist or the caller has no access to it."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/contacts/import":{"post":{"operationId":"importContacts","tags":["Contacts"],"summary":"Import contacts (CSV)","description":"Imports a CSV file (5 MB and 5,000 rows max) with a column mapping. Use `dryRun: true` to validate and get the report without creating anything (`created` is then the number of contacts the import would create). Rows matching an existing contact are skipped unless `onDuplicate: create`. Requires `contacts.manage`.\n\n**Permission:** `contacts.manage` on the target entity (API keys and people: from the role).  \n**Partner scope:** `contacts:write`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key of this request (e.g. a UUID), reused for its retries. For 24 hours, a retry with the same key and the same body answers the recorded response (same status and body, header `Idempotent-Replayed: true`) without running the request again; the same key with another body answers `422 idempotency_key_reused`, and while the first request is running `409 idempotency_in_progress`. A failed request releases its key. A request interrupted after it started (its outcome is unknown) is never run twice: its key answers `409 idempotency_outcome_unknown`, retry with a new key once you have checked the resource. For `multipart/form-data` uploads, the key alone identifies the request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"x-mlt-permissions":["contacts.manage"],"x-mlt-partner-scopes":["contacts:write"],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file","data"],"properties":{"file":{"type":"string","format":"binary","description":"The CSV file (UTF-8, header row)."},"data":{"type":"string","contentMediaType":"application/json","contentSchema":{"$ref":"#/components/schemas/ImportContactsData"},"description":"JSON string of the import options (entity, mapping target field → CSV column name). Schema: `ImportContactsData`."}}},"encoding":{"data":{"contentType":"application/json"}},"example":{"data":"{\"entityId\":\"0192f3a1-7c2e-7b4d-9a61-200000000002\",\"mapping\":{\"firstName\":\"Prénom\",\"lastName\":\"Nom\",\"email\":\"Email\",\"mobilePhone\":\"Mobile\",\"companyName\":\"Société\"},\"onDuplicate\":\"skip\",\"tags\":[\"import-octobre\"],\"dryRun\":true}"}}}},"responses":{"200":{"description":"The import report.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportReport"},"example":{"dryRun":true,"total":120,"created":0,"duplicates":[{"row":4,"code":"duplicate","message":"A contact with this email already exists","existing":{"id":"0192f3a1-7c2e-7b4d-9a61-600000000001","kind":"person","displayName":"Marie Durand"}}],"errors":[{"row":17,"code":"invalid_mobile_phone","message":"Invalid phone number: 06 12"}]}}}},"400":{"description":"Malformed request body (not parseable). Codes: `bad_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"bad_request":{"summary":"bad_request","value":{"error":{"code":"bad_request","message":"The request body is not valid JSON (it cannot be parsed)."}}}}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `entity_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"entity_not_found":{"summary":"entity_not_found","value":{"error":{"code":"entity_not_found","message":"The entity does not exist or the caller has no access to it."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `idempotency_in_progress`, `idempotency_outcome_unknown`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with the same `Idempotency-Key` is still running: retry a little later."}}},"idempotency_outcome_unknown":{"summary":"idempotency_outcome_unknown","value":{"error":{"code":"idempotency_outcome_unknown","message":"The request with the same `Idempotency-Key` was interrupted and its outcome is unknown (it is never run twice): check the resource, then retry with a new key."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`, `import_file_required`, `import_too_large`, `import_empty`, `import_unknown_column`, `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}},"import_file_required":{"summary":"import_file_required","value":{"error":{"code":"import_file_required","message":"The multipart `file` part is missing."}}},"import_too_large":{"summary":"import_too_large","value":{"error":{"code":"import_too_large","message":"The CSV exceeds 5 MB or 5,000 rows."}}},"import_empty":{"summary":"import_empty","value":{"error":{"code":"import_empty","message":"The CSV has no data row."}}},"import_unknown_column":{"summary":"import_unknown_column","value":{"error":{"code":"import_unknown_column","message":"The mapping refers to a column that is not in the CSV header."}}},"idempotency_key_reused":{"summary":"idempotency_key_reused","value":{"error":{"code":"idempotency_key_reused","message":"The `Idempotency-Key` was already used (within 24 hours) for a different request: use a new key."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/contacts/{id}":{"get":{"operationId":"getContact","tags":["Contacts"],"summary":"Retrieve a contact","description":"The contact and, for a company, the persons linked to it.\n\n**Permission:** `contacts.read` on the target entity (API keys and people: from the role).  \n**Partner scope:** `contacts:read`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)."}],"x-mlt-permissions":["contacts.read"],"x-mlt-partner-scopes":["contacts:read"],"responses":{"200":{"description":"The contact.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactDetail"},"example":{"id":"0192f3a1-7c2e-7b4d-9a61-600000000001","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","kind":"person","displayName":"Marie Durand","civility":"mrs","firstName":"Marie","lastName":"Durand","companyName":null,"company":{"id":"0192f3a1-7c2e-7b4d-9a61-600000000002","kind":"company","displayName":"SCI Les Tilleuls"},"jobTitle":"Gérante","siren":null,"siret":null,"email":"marie.durand@example.fr","otherEmails":[],"mobilePhone":"+33612345678","phone":null,"address":{"line1":"12 rue Vendôme","line2":null,"postalCode":"69006","city":"Lyon","country":"FR"},"recipientStatus":"individual","tags":["locataire","lot-12"],"notes":null,"externalRef":"CRM-00421","isPrivate":false,"createdBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"},"updatedBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"},"createdAt":"2026-09-20T10:00:00.000Z","updatedAt":"2026-09-28T16:42:00.000Z","access":{"canEdit":true,"canDelete":false},"people":[],"version":3}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `contact_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"contact_not_found":{"summary":"contact_not_found","value":{"error":{"code":"contact_not_found","message":"The contact does not exist or the caller cannot see it."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}},"patch":{"operationId":"updateContact","tags":["Contacts"],"summary":"Update a contact","description":"PATCH semantics: omitted fields are unchanged, `null` clears a field. Only the creator can change `isPrivate`.\n\n**Permission:** `contacts.write` on the target entity (API keys and people: from the role).  \n**Partner scope:** `contacts:write`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)."}],"x-mlt-permissions":["contacts.write"],"x-mlt-partner-scopes":["contacts:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContactBody"},"example":{"jobTitle":"Gérante associée","tags":["locataire","lot-12","garant"],"notes":null}}}},"responses":{"200":{"description":"The updated contact.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactDetail"},"example":{"id":"0192f3a1-7c2e-7b4d-9a61-600000000001","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","kind":"person","displayName":"Marie Durand","civility":"mrs","firstName":"Marie","lastName":"Durand","companyName":null,"company":{"id":"0192f3a1-7c2e-7b4d-9a61-600000000002","kind":"company","displayName":"SCI Les Tilleuls"},"jobTitle":"Gérante","siren":null,"siret":null,"email":"marie.durand@example.fr","otherEmails":[],"mobilePhone":"+33612345678","phone":null,"address":{"line1":"12 rue Vendôme","line2":null,"postalCode":"69006","city":"Lyon","country":"FR"},"recipientStatus":"individual","tags":["locataire","lot-12"],"notes":null,"externalRef":"CRM-00421","isPrivate":false,"createdBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"},"updatedBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"},"createdAt":"2026-09-20T10:00:00.000Z","updatedAt":"2026-09-28T16:42:00.000Z","access":{"canEdit":true,"canDelete":false},"people":[],"version":3}}}},"400":{"description":"Malformed request body (not parseable). Codes: `bad_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"bad_request":{"summary":"bad_request","value":{"error":{"code":"bad_request","message":"The request body is not valid JSON (it cannot be parsed)."}}}}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`, `private_owner_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}},"private_owner_only":{"summary":"private_owner_only","value":{"error":{"code":"private_owner_only","message":"Only the creator of a contact can change its visibility (`isPrivate`)."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `contact_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"contact_not_found":{"summary":"contact_not_found","value":{"error":{"code":"contact_not_found","message":"The contact does not exist or the caller cannot see it."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`, `invalid_company`, `invalid_phone`, `invalid_mobile_phone`, `invalid_siren`, `invalid_siret`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}},"invalid_company":{"summary":"invalid_company","value":{"error":{"code":"invalid_company","message":"`companyId` is not a visible company contact of the same entity."}}},"invalid_phone":{"summary":"invalid_phone","value":{"error":{"code":"invalid_phone","message":"`phone` is not a valid phone number."}}},"invalid_mobile_phone":{"summary":"invalid_mobile_phone","value":{"error":{"code":"invalid_mobile_phone","message":"`mobilePhone` is not a valid phone number."}}},"invalid_siren":{"summary":"invalid_siren","value":{"error":{"code":"invalid_siren","message":"Invalid SIREN (9 digits, Luhn checksum)."}}},"invalid_siret":{"summary":"invalid_siret","value":{"error":{"code":"invalid_siret","message":"Invalid SIRET (14 digits, Luhn checksum)."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}},"delete":{"operationId":"deleteContact","tags":["Contacts"],"summary":"Delete a contact","description":"Deletes the contact **permanently** (GDPR right to erasure). Persons linked to a deleted company keep its name as text; links to signature requests, registered mails and tasks are removed.\n\n**Permission:** `contacts.write` on the target entity (API keys and people: from the role).  \n**Partner scope:** `contacts:write`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)."}],"x-mlt-permissions":["contacts.write"],"x-mlt-partner-scopes":["contacts:write"],"responses":{"204":{"description":"Deleted.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `contact_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"contact_not_found":{"summary":"contact_not_found","value":{"error":{"code":"contact_not_found","message":"The contact does not exist or the caller cannot see it."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/contacts/{id}/merge":{"post":{"operationId":"mergeContacts","tags":["Contacts"],"summary":"Merge two contacts","description":"Merges `sourceId` into the contact `{id}` then deletes the source. Fields listed in `takeFromSource` take the source value; lists (emails, tags) are merged. Requires `contacts.manage` on both.\n\n**Permission:** `contacts.manage` on the target entity (API keys and people: from the role).  \n**Partner scope:** `contacts:write`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Target contact id (kept)."},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key of this request (e.g. a UUID), reused for its retries. For 24 hours, a retry with the same key and the same body answers the recorded response (same status and body, header `Idempotent-Replayed: true`) without running the request again; the same key with another body answers `422 idempotency_key_reused`, and while the first request is running `409 idempotency_in_progress`. A failed request releases its key. A request interrupted after it started (its outcome is unknown) is never run twice: its key answers `409 idempotency_outcome_unknown`, retry with a new key once you have checked the resource. For `multipart/form-data` uploads, the key alone identifies the request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"x-mlt-permissions":["contacts.manage"],"x-mlt-partner-scopes":["contacts:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeContactsBody"},"example":{"sourceId":"0192f3a1-7c2e-7b4d-9a61-600000000002","takeFromSource":["mobilePhone","address"]}}}},"responses":{"200":{"description":"The merged contact.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactDetail"},"example":{"id":"0192f3a1-7c2e-7b4d-9a61-600000000001","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","kind":"person","displayName":"Marie Durand","civility":"mrs","firstName":"Marie","lastName":"Durand","companyName":null,"company":{"id":"0192f3a1-7c2e-7b4d-9a61-600000000002","kind":"company","displayName":"SCI Les Tilleuls"},"jobTitle":"Gérante","siren":null,"siret":null,"email":"marie.durand@example.fr","otherEmails":[],"mobilePhone":"+33612345678","phone":null,"address":{"line1":"12 rue Vendôme","line2":null,"postalCode":"69006","city":"Lyon","country":"FR"},"recipientStatus":"individual","tags":["locataire","lot-12"],"notes":null,"externalRef":"CRM-00421","isPrivate":false,"createdBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"},"updatedBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"},"createdAt":"2026-09-20T10:00:00.000Z","updatedAt":"2026-09-28T16:42:00.000Z","access":{"canEdit":true,"canDelete":false},"people":[],"version":3}}}},"400":{"description":"Malformed request body (not parseable). Codes: `bad_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"bad_request":{"summary":"bad_request","value":{"error":{"code":"bad_request","message":"The request body is not valid JSON (it cannot be parsed)."}}}}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `contact_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"contact_not_found":{"summary":"contact_not_found","value":{"error":{"code":"contact_not_found","message":"The contact does not exist or the caller cannot see it."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `idempotency_in_progress`, `idempotency_outcome_unknown`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with the same `Idempotency-Key` is still running: retry a little later."}}},"idempotency_outcome_unknown":{"summary":"idempotency_outcome_unknown","value":{"error":{"code":"idempotency_outcome_unknown","message":"The request with the same `Idempotency-Key` was interrupted and its outcome is unknown (it is never run twice): check the resource, then retry with a new key."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`, `merge_same_contact`, `merge_kind_mismatch`, `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}},"merge_same_contact":{"summary":"merge_same_contact","value":{"error":{"code":"merge_same_contact","message":"A contact cannot be merged into itself."}}},"merge_kind_mismatch":{"summary":"merge_kind_mismatch","value":{"error":{"code":"merge_kind_mismatch","message":"Only contacts of the same kind can be merged."}}},"idempotency_key_reused":{"summary":"idempotency_key_reused","value":{"error":{"code":"idempotency_key_reused","message":"The `Idempotency-Key` was already used (within 24 hours) for a different request: use a new key."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/contacts/{id}/activity":{"get":{"operationId":"listContactActivity","tags":["Contacts"],"summary":"List the activity of a contact","description":"Signature requests, registered mails and tasks that involve the contact, newest first. Resources the caller cannot see are omitted.\n\n**Permission:** `contacts.read` on the target entity (API keys and people: from the role).  \n**Partner scope:** `contacts:read`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)."}],"x-mlt-permissions":["contacts.read"],"x-mlt-partner-scopes":["contacts:read"],"responses":{"200":{"description":"Activity entries.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/ContactActivity"}},"nextPageToken":{"type":"string","description":"Present when there is a next page: pass it as `pageToken`."}}},"example":{"results":[{"resourceType":"signature_request","resourceId":"0192f3a1-7c2e-7b4d-9a61-400000000001","at":"2026-10-01T09:30:00.000Z","title":"Bail - Lot 12","status":"sent","link":"/signatures/0192f3a1-7c2e-7b4d-9a61-400000000001"}]}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `contact_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"contact_not_found":{"summary":"contact_not_found","value":{"error":{"code":"contact_not_found","message":"The contact does not exist or the caller cannot see it."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/registered-mails/sender-accounts":{"get":{"operationId":"listSenderAccounts","tags":["Sender accounts"],"summary":"List sender accounts","description":"Sender identities of the entity at the registered mail vendor.\n\n**Permission:** `registered_mail.send` or `registered_mail.manage` on the target entity (API keys and people: from the role).  \n**Partner scope:** `registered_mail:write`.","parameters":[{"name":"entityId","required":true,"in":"query","schema":{"format":"uuid","type":"string"},"description":"Entity id (see `GET /v1/me` → `scopes[].entityId`)."}],"x-mlt-permissions":["registered_mail.send","registered_mail.manage"],"x-mlt-partner-scopes":["registered_mail:write"],"responses":{"200":{"description":"Sender accounts.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/SenderAccount"}},"nextPageToken":{"type":"string","description":"Present when there is a next page: pass it as `pageToken`."}}},"example":{"results":[{"id":"0192f3a1-7c2e-7b4d-9a61-510000000001","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","vendor":"ar24","label":"Cabinet Bernard - LRE","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard","company":"Cabinet Bernard Immobilier","kind":"professional","verification":"verified","otpConfigured":true,"linkedAt":"2026-09-15T14:20:00.000Z","createdAt":"2026-09-15T14:18:00.000Z"}]}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `entity_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"entity_not_found":{"summary":"entity_not_found","value":{"error":{"code":"entity_not_found","message":"The entity does not exist or the caller has no access to it."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}},"post":{"operationId":"createSenderAccount","tags":["Sender accounts"],"summary":"Create or link a sender account","description":"`mode: create` creates the account at the vendor (the vendor then verifies the sender identity); `mode: link` associates an existing vendor account by email.\n\n**Permission:** `registered_mail.manage` on the target entity (API keys and people: from the role).  \n**Partner scope:** `registered_mail:write`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key of this request (e.g. a UUID), reused for its retries. For 24 hours, a retry with the same key and the same body answers the recorded response (same status and body, header `Idempotent-Replayed: true`) without running the request again; the same key with another body answers `422 idempotency_key_reused`, and while the first request is running `409 idempotency_in_progress`. A failed request releases its key. A request interrupted after it started (its outcome is unknown) is never run twice: its key answers `409 idempotency_outcome_unknown`, retry with a new key once you have checked the resource. For `multipart/form-data` uploads, the key alone identifies the request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"x-mlt-permissions":["registered_mail.manage"],"x-mlt-partner-scopes":["registered_mail:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSenderAccountBody"},"example":{"entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","mode":"create","label":"Cabinet Bernard - LRE","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard","company":"Cabinet Bernard Immobilier","kind":"professional","address":{"line1":"8 cours Franklin Roosevelt","zipCode":"69006","city":"Lyon","country":"FR"}}}}},"responses":{"201":{"description":"The sender account.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SenderAccount"},"example":{"id":"0192f3a1-7c2e-7b4d-9a61-510000000001","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","vendor":"ar24","label":"Cabinet Bernard - LRE","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard","company":"Cabinet Bernard Immobilier","kind":"professional","verification":"pending","otpConfigured":false,"linkedAt":"2026-09-15T14:20:00.000Z","createdAt":"2026-09-15T14:18:00.000Z"}}}},"400":{"description":"Malformed request body (not parseable). Codes: `bad_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"bad_request":{"summary":"bad_request","value":{"error":{"code":"bad_request","message":"The request body is not valid JSON (it cannot be parsed)."}}}}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `entity_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"entity_not_found":{"summary":"entity_not_found","value":{"error":{"code":"entity_not_found","message":"The entity does not exist or the caller has no access to it."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `sender_account_exists`, `vendor_error`, `idempotency_in_progress`, `idempotency_outcome_unknown`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"sender_account_exists":{"summary":"sender_account_exists","value":{"error":{"code":"sender_account_exists","message":"A sender account with this email already exists for the entity."}}},"vendor_error":{"summary":"vendor_error","value":{"error":{"code":"vendor_error","message":"The registered mail vendor refused the operation or is unreachable. `message` carries the vendor reason."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with the same `Idempotency-Key` is still running: retry a little later."}}},"idempotency_outcome_unknown":{"summary":"idempotency_outcome_unknown","value":{"error":{"code":"idempotency_outcome_unknown","message":"The request with the same `Idempotency-Key` was interrupted and its outcome is unknown (it is never run twice): check the resource, then retry with a new key."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`, `vendor_not_allowed`, `sender_company_required`, `sender_label_required`, `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}},"vendor_not_allowed":{"summary":"vendor_not_allowed","value":{"error":{"code":"vendor_not_allowed","message":"The vendor is not allowed by the entity settings (also used by registered mail)."}}},"sender_company_required":{"summary":"sender_company_required","value":{"error":{"code":"sender_company_required","message":"Professional sender accounts need a company name."}}},"sender_label_required":{"summary":"sender_label_required","value":{"error":{"code":"sender_label_required","message":"The sender account label is required."}}},"idempotency_key_reused":{"summary":"idempotency_key_reused","value":{"error":{"code":"idempotency_key_reused","message":"The `Idempotency-Key` was already used (within 24 hours) for a different request: use a new key."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/registered-mails/sender-accounts/{id}/refresh":{"post":{"operationId":"refreshSenderAccount","tags":["Sender accounts"],"summary":"Refresh the verification status","description":"Reads the verification status of the account at the vendor.\n\n**Permission:** `registered_mail.manage` on the target entity (API keys and people: from the role).  \n**Partner scope:** `registered_mail:write`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)."},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key of this request (e.g. a UUID), reused for its retries. For 24 hours, a retry with the same key and the same body answers the recorded response (same status and body, header `Idempotent-Replayed: true`) without running the request again; the same key with another body answers `422 idempotency_key_reused`, and while the first request is running `409 idempotency_in_progress`. A failed request releases its key. A request interrupted after it started (its outcome is unknown) is never run twice: its key answers `409 idempotency_outcome_unknown`, retry with a new key once you have checked the resource. For `multipart/form-data` uploads, the key alone identifies the request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"x-mlt-permissions":["registered_mail.manage"],"x-mlt-partner-scopes":["registered_mail:write"],"responses":{"200":{"description":"The sender account.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SenderAccount"},"example":{"id":"0192f3a1-7c2e-7b4d-9a61-510000000001","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","vendor":"ar24","label":"Cabinet Bernard - LRE","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard","company":"Cabinet Bernard Immobilier","kind":"professional","verification":"verified","otpConfigured":true,"linkedAt":"2026-09-15T14:20:00.000Z","createdAt":"2026-09-15T14:18:00.000Z"}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `sender_account_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"sender_account_not_found":{"summary":"sender_account_not_found","value":{"error":{"code":"sender_account_not_found","message":"The sender account does not exist or the caller cannot see it."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `vendor_error`, `idempotency_in_progress`, `idempotency_outcome_unknown`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"vendor_error":{"summary":"vendor_error","value":{"error":{"code":"vendor_error","message":"The registered mail vendor refused the operation or is unreachable. `message` carries the vendor reason."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with the same `Idempotency-Key` is still running: retry a little later."}}},"idempotency_outcome_unknown":{"summary":"idempotency_outcome_unknown","value":{"error":{"code":"idempotency_outcome_unknown","message":"The request with the same `Idempotency-Key` was interrupted and its outcome is unknown (it is never run twice): check the resource, then retry with a new key."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_key_reused":{"summary":"idempotency_key_reused","value":{"error":{"code":"idempotency_key_reused","message":"The `Idempotency-Key` was already used (within 24 hours) for a different request: use a new key."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/registered-mails/sender-accounts/{id}/otp-secret":{"put":{"operationId":"setSenderOtpSecret","tags":["Sender accounts"],"summary":"Set the OTP secret","description":"Stores the base32 TOTP secret of the vendor account, used for the eIDAS authentication of the sender when sending qualified mails. Write-only: it is never returned.\n\n**Permission:** `registered_mail.manage` on the target entity (API keys and people: from the role).  \n**Partner scope:** `registered_mail:write`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)."}],"x-mlt-permissions":["registered_mail.manage"],"x-mlt-partner-scopes":["registered_mail:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSenderOtpSecretBody"},"example":{"secret":"JBSWY3DPEHPK3PXPJBSWY3DPEHPK3PXP"}}}},"responses":{"200":{"description":"The sender account.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SenderAccount"},"example":{"id":"0192f3a1-7c2e-7b4d-9a61-510000000001","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","vendor":"ar24","label":"Cabinet Bernard - LRE","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard","company":"Cabinet Bernard Immobilier","kind":"professional","verification":"verified","otpConfigured":true,"linkedAt":"2026-09-15T14:20:00.000Z","createdAt":"2026-09-15T14:18:00.000Z"}}}},"400":{"description":"Malformed request body (not parseable). Codes: `bad_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"bad_request":{"summary":"bad_request","value":{"error":{"code":"bad_request","message":"The request body is not valid JSON (it cannot be parsed)."}}}}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `sender_account_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"sender_account_not_found":{"summary":"sender_account_not_found","value":{"error":{"code":"sender_account_not_found","message":"The sender account does not exist or the caller cannot see it."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/registered-mails":{"get":{"operationId":"listRegisteredMails","tags":["Registered mail"],"summary":"List registered mails","description":"Registered mails visible to the caller, newest first.\n\n**Permission:** `registered_mail.read` on the target entity (API keys and people: from the role).  \n**Partner scope:** `registered_mail:read`.","parameters":[{"name":"pageToken","required":false,"in":"query","schema":{"maxLength":500,"type":"string"},"description":"Cursor returned as `nextPageToken` by the previous page."},{"name":"pageSize","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"integer"},"description":"Items per page (1-100, default 25)."},{"name":"entityId","required":false,"in":"query","schema":{"format":"uuid","type":"string"},"description":"Only the mails of this entity."},{"name":"status","required":false,"in":"query","schema":{"anyOf":[{"type":"array","items":{"type":"string","enum":["draft","sending","in_progress","completed","partially_failed","failed","canceled"]}},{"type":"string"}]},"description":"One status or a comma-separated list (e.g. `partially_failed,failed`)."},{"name":"type","required":false,"in":"query","schema":{"type":"string","enum":["qualified","simple"]},"description":"Only this type."},{"name":"q","required":false,"in":"query","schema":{"maxLength":100,"type":"string"},"description":"Searches the subject, the references and the recipient names and emails."}],"x-mlt-permissions":["registered_mail.read"],"x-mlt-partner-scopes":["registered_mail:read"],"responses":{"200":{"description":"A page of registered mails.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/RegisteredMailSummary"}},"nextPageToken":{"type":"string","description":"Present when there is a next page: pass it as `pageToken`."}}},"example":{"results":[{"id":"0192f3a1-7c2e-7b4d-9a61-500000000001","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","type":"qualified","vendor":"ar24","status":"in_progress","subject":"Mise en demeure - Loyers impayés Lot 12","reference":"LRE-2026-0142","clientReference":"DOSSIER-8841","senderAccountId":"0192f3a1-7c2e-7b4d-9a61-510000000001","progress":{"total":1,"pending":1,"delivered":0,"refused":0,"neglected":0,"failed":0},"createdBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"},"createdAt":"2026-10-02T07:55:00.000Z","sentAt":"2026-10-02T08:00:03.000Z","recipients":[{"firstName":"Marie","lastName":"Durand","email":"marie.durand@example.fr","company":null,"kind":"individual","contactId":"0192f3a1-7c2e-7b4d-9a61-600000000001","status":"deposited"}],"attachmentCount":1}]}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`, `invalid_page_token`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}},"invalid_page_token":{"summary":"invalid_page_token","value":{"error":{"code":"invalid_page_token","message":"The `pageToken` is malformed or does not belong to this list."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}},"post":{"operationId":"createRegisteredMail","tags":["Registered mail"],"summary":"Create a registered mail draft","description":"Creates a draft: nothing is sent yet. Add PDF attachments, then send it with `POST /v1/registered-mails/{id}/send`. One item is created per recipient.\n\n**Permission:** `registered_mail.send` on the target entity (API keys and people: from the role).  \n**Partner scope:** `registered_mail:write`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key of this request (e.g. a UUID), reused for its retries. For 24 hours, a retry with the same key and the same body answers the recorded response (same status and body, header `Idempotent-Replayed: true`) without running the request again; the same key with another body answers `422 idempotency_key_reused`, and while the first request is running `409 idempotency_in_progress`. A failed request releases its key. A request interrupted after it started (its outcome is unknown) is never run twice: its key answers `409 idempotency_outcome_unknown`, retry with a new key once you have checked the resource. For `multipart/form-data` uploads, the key alone identifies the request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"x-mlt-permissions":["registered_mail.send"],"x-mlt-partner-scopes":["registered_mail:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRegisteredMailBody"},"example":{"entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","type":"qualified","subject":"Mise en demeure - Loyers impayés Lot 12","reference":"LRE-2026-0142","clientReference":"DOSSIER-8841","contentHtml":"<p>Madame,</p><p>Malgré nos relances, les loyers de juillet à septembre restent impayés…</p>","senderAccountId":"0192f3a1-7c2e-7b4d-9a61-510000000001","recipients":[{"firstName":"Marie","lastName":"Durand","email":"marie.durand@example.fr","kind":"individual","contactId":"0192f3a1-7c2e-7b4d-9a61-600000000001"}],"followers":["comptabilite@cabinet-bernard.fr"]}}}},"responses":{"201":{"description":"The draft.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisteredMail"},"example":{"id":"0192f3a1-7c2e-7b4d-9a61-500000000001","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","type":"qualified","vendor":"ar24","status":"draft","subject":"Mise en demeure - Loyers impayés Lot 12","reference":"LRE-2026-0142","clientReference":"DOSSIER-8841","contentHtml":"<p>Madame,</p><p>Malgré nos relances, les loyers de juillet à septembre restent impayés…</p>","messageTemplate":null,"senderAccountId":"0192f3a1-7c2e-7b4d-9a61-510000000001","followers":["comptabilite@cabinet-bernard.fr"],"attachments":[],"items":[{"id":"0192f3a1-7c2e-7b4d-9a61-500000000011","recipient":{"firstName":"Marie","lastName":"Durand","email":"marie.durand@example.fr","company":null,"kind":"individual","contactId":"0192f3a1-7c2e-7b4d-9a61-600000000001"},"status":"draft","error":null,"retryable":false,"submittedAt":null,"completedAt":null,"timeline":[],"proofs":[],"recipientUpdates":[]}],"progress":{"total":1,"pending":1,"delivered":0,"refused":0,"neglected":0,"failed":0},"createdBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"},"createdAt":"2026-10-02T07:55:00.000Z","sentAt":null,"version":1}}}},"400":{"description":"Malformed request body (not parseable). Codes: `bad_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"bad_request":{"summary":"bad_request","value":{"error":{"code":"bad_request","message":"The request body is not valid JSON (it cannot be parsed)."}}}}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`, `feature_disabled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}},"feature_disabled":{"summary":"feature_disabled","value":{"error":{"code":"feature_disabled","message":"The feature (signature, registered mail, tasks) is not enabled for this entity."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `entity_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"entity_not_found":{"summary":"entity_not_found","value":{"error":{"code":"entity_not_found","message":"The entity does not exist or the caller has no access to it."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `idempotency_in_progress`, `idempotency_outcome_unknown`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with the same `Idempotency-Key` is still running: retry a little later."}}},"idempotency_outcome_unknown":{"summary":"idempotency_outcome_unknown","value":{"error":{"code":"idempotency_outcome_unknown","message":"The request with the same `Idempotency-Key` was interrupted and its outcome is unknown (it is never run twice): check the resource, then retry with a new key."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`, `type_not_allowed`, `invalid_sender_account`, `duplicate_recipient_email`, `too_many_recipients`, `too_many_followers`, `invalid_contact`, `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}},"type_not_allowed":{"summary":"type_not_allowed","value":{"error":{"code":"type_not_allowed","message":"The registered mail type is not allowed by the entity settings."}}},"invalid_sender_account":{"summary":"invalid_sender_account","value":{"error":{"code":"invalid_sender_account","message":"The sender account does not belong to this entity."}}},"duplicate_recipient_email":{"summary":"duplicate_recipient_email","value":{"error":{"code":"duplicate_recipient_email","message":"Two recipients have the same email address."}}},"too_many_recipients":{"summary":"too_many_recipients","value":{"error":{"code":"too_many_recipients","message":"Too many recipients (max 50)."}}},"too_many_followers":{"summary":"too_many_followers","value":{"error":{"code":"too_many_followers","message":"Too many followers (max 20)."}}},"invalid_contact":{"summary":"invalid_contact","value":{"error":{"code":"invalid_contact","message":"A linked `contactId` is not visible to the caller or does not belong to the resource entity."}}},"idempotency_key_reused":{"summary":"idempotency_key_reused","value":{"error":{"code":"idempotency_key_reused","message":"The `Idempotency-Key` was already used (within 24 hours) for a different request: use a new key."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/registered-mails/options":{"get":{"operationId":"getRegisteredMailOptions","tags":["Registered mail"],"summary":"Retrieve the registered mail options of an entity","description":"Effective settings (allowed types, vendor, reference requirement, attachment limits) and the remaining quota.\n\n**Permission:** `registered_mail.read` on the target entity (API keys and people: from the role).  \n**Partner scope:** `registered_mail:read`.","parameters":[{"name":"entityId","required":true,"in":"query","schema":{"format":"uuid","type":"string"},"description":"Entity id (see `GET /v1/me` → `scopes[].entityId`)."}],"x-mlt-permissions":["registered_mail.read"],"x-mlt-partner-scopes":["registered_mail:read"],"responses":{"200":{"description":"Effective options.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisteredMailOptions"},"example":{"entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","enabled":true,"typesAllowed":["qualified","simple"],"typeDefault":"qualified","vendor":"ar24","referenceRequired":false,"followersDefault":[],"attachmentsMaxCount":10,"attachmentsMaxSizeMb":256,"quota":{"limit":500,"used":42,"remaining":458,"blocking":true}}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `entity_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"entity_not_found":{"summary":"entity_not_found","value":{"error":{"code":"entity_not_found","message":"The entity does not exist or the caller has no access to it."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/registered-mails/{id}":{"get":{"operationId":"getRegisteredMail","tags":["Registered mail"],"summary":"Retrieve a registered mail","description":"The mail with, for each recipient, its status timeline, stored proofs and email change requests.\n\n**Permission:** `registered_mail.read` on the target entity (API keys and people: from the role).  \n**Partner scope:** `registered_mail:read`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)."}],"x-mlt-permissions":["registered_mail.read"],"x-mlt-partner-scopes":["registered_mail:read"],"responses":{"200":{"description":"The registered mail.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisteredMail"},"example":{"id":"0192f3a1-7c2e-7b4d-9a61-500000000001","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","type":"qualified","vendor":"ar24","status":"in_progress","subject":"Mise en demeure - Loyers impayés Lot 12","reference":"LRE-2026-0142","clientReference":"DOSSIER-8841","contentHtml":"<p>Madame,</p><p>Malgré nos relances, les loyers de juillet à septembre restent impayés…</p>","messageTemplate":null,"senderAccountId":"0192f3a1-7c2e-7b4d-9a61-510000000001","followers":["comptabilite@cabinet-bernard.fr"],"attachments":[{"id":"0192f3a1-7c2e-7b4d-9a61-500000000021","name":"mise-en-demeure.pdf","sizeBytes":182340,"sha256":"3f79bb7b435b05321651daefd374cdc681dc06faa65e374e38337b88ca046dea"}],"items":[{"id":"0192f3a1-7c2e-7b4d-9a61-500000000011","recipient":{"firstName":"Marie","lastName":"Durand","email":"marie.durand@example.fr","company":null,"kind":"individual","contactId":"0192f3a1-7c2e-7b4d-9a61-600000000001"},"status":"deposited","error":null,"retryable":false,"submittedAt":"2026-10-02T08:00:03.000Z","completedAt":null,"timeline":[{"status":"sent","at":"2026-10-02T08:00:03.000Z","source":"system","detail":null},{"status":"deposited","at":"2026-10-02T08:00:41.000Z","source":"vendor","detail":null}],"proofs":[{"kind":"deposit","sha256":"9b74c9897bac770ffc029102a200c5de0f1a4f5b8c9a1b2c3d4e5f60718293a4","sizeBytes":60211,"storedAt":"2026-10-02T08:01:10.000Z"}],"recipientUpdates":[]}],"progress":{"total":1,"pending":1,"delivered":0,"refused":0,"neglected":0,"failed":0},"createdBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"},"createdAt":"2026-10-02T07:55:00.000Z","sentAt":"2026-10-02T08:00:03.000Z","version":2}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `registered_mail_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"registered_mail_not_found":{"summary":"registered_mail_not_found","value":{"error":{"code":"registered_mail_not_found","message":"The registered mail does not exist or the caller cannot see it."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}},"patch":{"operationId":"updateRegisteredMail","tags":["Registered mail"],"summary":"Update a registered mail draft","description":"Changes a draft. Every field is optional; `recipients` and `followers` replace the current lists.\n\n**Permission:** `registered_mail.send` on the target entity (API keys and people: from the role).  \n**Partner scope:** `registered_mail:write`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)."}],"x-mlt-permissions":["registered_mail.send"],"x-mlt-partner-scopes":["registered_mail:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRegisteredMailBody"},"example":{"subject":"Mise en demeure - Loyers impayés Lot 12 (2e envoi)","followers":["comptabilite@cabinet-bernard.fr","direction@cabinet-bernard.fr"]}}}},"responses":{"200":{"description":"The updated draft.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisteredMail"},"example":{"id":"0192f3a1-7c2e-7b4d-9a61-500000000001","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","type":"qualified","vendor":"ar24","status":"draft","subject":"Mise en demeure - Loyers impayés Lot 12","reference":"LRE-2026-0142","clientReference":"DOSSIER-8841","contentHtml":"<p>Madame,</p><p>Malgré nos relances, les loyers de juillet à septembre restent impayés…</p>","messageTemplate":null,"senderAccountId":"0192f3a1-7c2e-7b4d-9a61-510000000001","followers":["comptabilite@cabinet-bernard.fr"],"attachments":[],"items":[{"id":"0192f3a1-7c2e-7b4d-9a61-500000000011","recipient":{"firstName":"Marie","lastName":"Durand","email":"marie.durand@example.fr","company":null,"kind":"individual","contactId":"0192f3a1-7c2e-7b4d-9a61-600000000001"},"status":"draft","error":null,"retryable":false,"submittedAt":null,"completedAt":null,"timeline":[],"proofs":[],"recipientUpdates":[]}],"progress":{"total":1,"pending":1,"delivered":0,"refused":0,"neglected":0,"failed":0},"createdBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"},"createdAt":"2026-10-02T07:55:00.000Z","sentAt":null,"version":1}}}},"400":{"description":"Malformed request body (not parseable). Codes: `bad_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"bad_request":{"summary":"bad_request","value":{"error":{"code":"bad_request","message":"The request body is not valid JSON (it cannot be parsed)."}}}}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `registered_mail_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"registered_mail_not_found":{"summary":"registered_mail_not_found","value":{"error":{"code":"registered_mail_not_found","message":"The registered mail does not exist or the caller cannot see it."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `registered_mail_already_sent`, `registered_mail_canceled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"registered_mail_already_sent":{"summary":"registered_mail_already_sent","value":{"error":{"code":"registered_mail_already_sent","message":"The mail was already sent with another idempotency key, or is no longer a draft."}}},"registered_mail_canceled":{"summary":"registered_mail_canceled","value":{"error":{"code":"registered_mail_canceled","message":"The registered mail was canceled."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`, `type_not_allowed`, `duplicate_recipient_email`, `invalid_contact`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}},"type_not_allowed":{"summary":"type_not_allowed","value":{"error":{"code":"type_not_allowed","message":"The registered mail type is not allowed by the entity settings."}}},"duplicate_recipient_email":{"summary":"duplicate_recipient_email","value":{"error":{"code":"duplicate_recipient_email","message":"Two recipients have the same email address."}}},"invalid_contact":{"summary":"invalid_contact","value":{"error":{"code":"invalid_contact","message":"A linked `contactId` is not visible to the caller or does not belong to the resource entity."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/registered-mails/{id}/attachments":{"post":{"operationId":"addRegisteredMailAttachment","tags":["Registered mail"],"summary":"Add an attachment","description":"Uploads one PDF attachment to a draft (`multipart/form-data`, part `file`). Count and total size are limited by the entity settings (`attachmentsMaxCount`, `attachmentsMaxSizeMb`).\n\n**Permission:** `registered_mail.send` on the target entity (API keys and people: from the role).  \n**Partner scope:** `registered_mail:write`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)."},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key of this request (e.g. a UUID), reused for its retries. For 24 hours, a retry with the same key and the same body answers the recorded response (same status and body, header `Idempotent-Replayed: true`) without running the request again; the same key with another body answers `422 idempotency_key_reused`, and while the first request is running `409 idempotency_in_progress`. A failed request releases its key. A request interrupted after it started (its outcome is unknown) is never run twice: its key answers `409 idempotency_outcome_unknown`, retry with a new key once you have checked the resource. For `multipart/form-data` uploads, the key alone identifies the request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"x-mlt-permissions":["registered_mail.send"],"x-mlt-partner-scopes":["registered_mail:write"],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"The PDF attachment."}}},"encoding":{}}}},"responses":{"201":{"description":"The draft with the new attachment.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisteredMail"},"example":{"id":"0192f3a1-7c2e-7b4d-9a61-500000000001","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","type":"qualified","vendor":"ar24","status":"draft","subject":"Mise en demeure - Loyers impayés Lot 12","reference":"LRE-2026-0142","clientReference":"DOSSIER-8841","contentHtml":"<p>Madame,</p><p>Malgré nos relances, les loyers de juillet à septembre restent impayés…</p>","messageTemplate":null,"senderAccountId":"0192f3a1-7c2e-7b4d-9a61-510000000001","followers":["comptabilite@cabinet-bernard.fr"],"attachments":[{"id":"0192f3a1-7c2e-7b4d-9a61-500000000021","name":"mise-en-demeure.pdf","sizeBytes":182340,"sha256":"3f79bb7b435b05321651daefd374cdc681dc06faa65e374e38337b88ca046dea"}],"items":[{"id":"0192f3a1-7c2e-7b4d-9a61-500000000011","recipient":{"firstName":"Marie","lastName":"Durand","email":"marie.durand@example.fr","company":null,"kind":"individual","contactId":"0192f3a1-7c2e-7b4d-9a61-600000000001"},"status":"draft","error":null,"retryable":false,"submittedAt":null,"completedAt":null,"timeline":[],"proofs":[],"recipientUpdates":[]}],"progress":{"total":1,"pending":1,"delivered":0,"refused":0,"neglected":0,"failed":0},"createdBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"},"createdAt":"2026-10-02T07:55:00.000Z","sentAt":null,"version":1}}}},"400":{"description":"Malformed request body (not parseable). Codes: `bad_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"bad_request":{"summary":"bad_request","value":{"error":{"code":"bad_request","message":"The request body is not valid JSON (it cannot be parsed)."}}}}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `registered_mail_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"registered_mail_not_found":{"summary":"registered_mail_not_found","value":{"error":{"code":"registered_mail_not_found","message":"The registered mail does not exist or the caller cannot see it."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `registered_mail_already_sent`, `idempotency_in_progress`, `idempotency_outcome_unknown`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"registered_mail_already_sent":{"summary":"registered_mail_already_sent","value":{"error":{"code":"registered_mail_already_sent","message":"The mail was already sent with another idempotency key, or is no longer a draft."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with the same `Idempotency-Key` is still running: retry a little later."}}},"idempotency_outcome_unknown":{"summary":"idempotency_outcome_unknown","value":{"error":{"code":"idempotency_outcome_unknown","message":"The request with the same `Idempotency-Key` was interrupted and its outcome is unknown (it is never run twice): check the resource, then retry with a new key."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`, `file_required`, `invalid_pdf`, `attachments_limit_exceeded`, `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}},"file_required":{"summary":"file_required","value":{"error":{"code":"file_required","message":"The multipart `file` part is missing."}}},"invalid_pdf":{"summary":"invalid_pdf","value":{"error":{"code":"invalid_pdf","message":"The file is not a readable PDF."}}},"attachments_limit_exceeded":{"summary":"attachments_limit_exceeded","value":{"error":{"code":"attachments_limit_exceeded","message":"Too many attachments, or total size above the entity limit."}}},"idempotency_key_reused":{"summary":"idempotency_key_reused","value":{"error":{"code":"idempotency_key_reused","message":"The `Idempotency-Key` was already used (within 24 hours) for a different request: use a new key."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/registered-mails/{id}/attachments/{attachmentId}":{"get":{"operationId":"downloadRegisteredMailAttachment","tags":["Registered mail"],"summary":"Download an attachment","description":"Downloads one attachment of the mail.\n\n**Permission:** `registered_mail.read` on the target entity (API keys and people: from the role).  \n**Partner scope:** `registered_mail:read`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)."},{"name":"attachmentId","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Attachment id."}],"x-mlt-permissions":["registered_mail.read"],"x-mlt-partner-scopes":["registered_mail:read"],"responses":{"200":{"description":"The PDF.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `registered_mail_not_found`, `registered_mail_attachment_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"registered_mail_not_found":{"summary":"registered_mail_not_found","value":{"error":{"code":"registered_mail_not_found","message":"The registered mail does not exist or the caller cannot see it."}}},"registered_mail_attachment_not_found":{"summary":"registered_mail_attachment_not_found","value":{"error":{"code":"registered_mail_attachment_not_found","message":"Unknown attachment for this registered mail."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}},"delete":{"operationId":"removeRegisteredMailAttachment","tags":["Registered mail"],"summary":"Remove an attachment","description":"Removes an attachment from a draft.\n\n**Permission:** `registered_mail.send` on the target entity (API keys and people: from the role).  \n**Partner scope:** `registered_mail:write`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)."},{"name":"attachmentId","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Attachment id."}],"x-mlt-permissions":["registered_mail.send"],"x-mlt-partner-scopes":["registered_mail:write"],"responses":{"200":{"description":"The draft.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisteredMail"},"example":{"id":"0192f3a1-7c2e-7b4d-9a61-500000000001","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","type":"qualified","vendor":"ar24","status":"draft","subject":"Mise en demeure - Loyers impayés Lot 12","reference":"LRE-2026-0142","clientReference":"DOSSIER-8841","contentHtml":"<p>Madame,</p><p>Malgré nos relances, les loyers de juillet à septembre restent impayés…</p>","messageTemplate":null,"senderAccountId":"0192f3a1-7c2e-7b4d-9a61-510000000001","followers":["comptabilite@cabinet-bernard.fr"],"attachments":[],"items":[{"id":"0192f3a1-7c2e-7b4d-9a61-500000000011","recipient":{"firstName":"Marie","lastName":"Durand","email":"marie.durand@example.fr","company":null,"kind":"individual","contactId":"0192f3a1-7c2e-7b4d-9a61-600000000001"},"status":"draft","error":null,"retryable":false,"submittedAt":null,"completedAt":null,"timeline":[],"proofs":[],"recipientUpdates":[]}],"progress":{"total":1,"pending":1,"delivered":0,"refused":0,"neglected":0,"failed":0},"createdBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"},"createdAt":"2026-10-02T07:55:00.000Z","sentAt":null,"version":1}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `registered_mail_not_found`, `registered_mail_attachment_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"registered_mail_not_found":{"summary":"registered_mail_not_found","value":{"error":{"code":"registered_mail_not_found","message":"The registered mail does not exist or the caller cannot see it."}}},"registered_mail_attachment_not_found":{"summary":"registered_mail_attachment_not_found","value":{"error":{"code":"registered_mail_attachment_not_found","message":"Unknown attachment for this registered mail."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `registered_mail_already_sent`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"registered_mail_already_sent":{"summary":"registered_mail_already_sent","value":{"error":{"code":"registered_mail_already_sent","message":"The mail was already sent with another idempotency key, or is no longer a draft."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/registered-mails/{id}/send":{"post":{"operationId":"sendRegisteredMail","tags":["Registered mail"],"summary":"Send a registered mail","description":"Submits the draft to the vendor, one item per recipient. Items fail independently: a failed item (`retryable: true`) can be retried without resending the others.\n\n**Idempotent** by `idempotencyKey` (8-128 characters, e.g. a UUID you generate): retrying with the same key returns the current state without sending again; another key on an already sent mail returns `409 registered_mail_already_sent`. Each item counts against the quota.\n\n**Permission:** `registered_mail.send` on the target entity (API keys and people: from the role).  \n**Partner scope:** `registered_mail:write`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)."},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key of this request (e.g. a UUID), reused for its retries. For 24 hours, a retry with the same key and the same body answers the recorded response (same status and body, header `Idempotent-Replayed: true`) without running the request again; the same key with another body answers `422 idempotency_key_reused`, and while the first request is running `409 idempotency_in_progress`. A failed request releases its key. A request interrupted after it started (its outcome is unknown) is never run twice: its key answers `409 idempotency_outcome_unknown`, retry with a new key once you have checked the resource. For `multipart/form-data` uploads, the key alone identifies the request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"x-mlt-permissions":["registered_mail.send"],"x-mlt-partner-scopes":["registered_mail:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendRegisteredMailBody"},"example":{"idempotencyKey":"5f1c2b9e-8f0a-4c7d-9d3e-2a6b1c0e9f47"}}}},"responses":{"200":{"description":"The mail, now sending or in progress.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisteredMail"},"example":{"id":"0192f3a1-7c2e-7b4d-9a61-500000000001","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","type":"qualified","vendor":"ar24","status":"in_progress","subject":"Mise en demeure - Loyers impayés Lot 12","reference":"LRE-2026-0142","clientReference":"DOSSIER-8841","contentHtml":"<p>Madame,</p><p>Malgré nos relances, les loyers de juillet à septembre restent impayés…</p>","messageTemplate":null,"senderAccountId":"0192f3a1-7c2e-7b4d-9a61-510000000001","followers":["comptabilite@cabinet-bernard.fr"],"attachments":[{"id":"0192f3a1-7c2e-7b4d-9a61-500000000021","name":"mise-en-demeure.pdf","sizeBytes":182340,"sha256":"3f79bb7b435b05321651daefd374cdc681dc06faa65e374e38337b88ca046dea"}],"items":[{"id":"0192f3a1-7c2e-7b4d-9a61-500000000011","recipient":{"firstName":"Marie","lastName":"Durand","email":"marie.durand@example.fr","company":null,"kind":"individual","contactId":"0192f3a1-7c2e-7b4d-9a61-600000000001"},"status":"deposited","error":null,"retryable":false,"submittedAt":"2026-10-02T08:00:03.000Z","completedAt":null,"timeline":[{"status":"sent","at":"2026-10-02T08:00:03.000Z","source":"system","detail":null},{"status":"deposited","at":"2026-10-02T08:00:41.000Z","source":"vendor","detail":null}],"proofs":[{"kind":"deposit","sha256":"9b74c9897bac770ffc029102a200c5de0f1a4f5b8c9a1b2c3d4e5f60718293a4","sizeBytes":60211,"storedAt":"2026-10-02T08:01:10.000Z"}],"recipientUpdates":[]}],"progress":{"total":1,"pending":1,"delivered":0,"refused":0,"neglected":0,"failed":0},"createdBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"},"createdAt":"2026-10-02T07:55:00.000Z","sentAt":"2026-10-02T08:00:03.000Z","version":2}}}},"400":{"description":"Malformed request body (not parseable). Codes: `bad_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"bad_request":{"summary":"bad_request","value":{"error":{"code":"bad_request","message":"The request body is not valid JSON (it cannot be parsed)."}}}}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`, `feature_disabled`, `quota_exceeded`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}},"feature_disabled":{"summary":"feature_disabled","value":{"error":{"code":"feature_disabled","message":"The feature (signature, registered mail, tasks) is not enabled for this entity."}}},"quota_exceeded":{"summary":"quota_exceeded","value":{"error":{"code":"quota_exceeded","message":"The quota of the organization or entity is reached and set to block (see the `options` endpoints)."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `registered_mail_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"registered_mail_not_found":{"summary":"registered_mail_not_found","value":{"error":{"code":"registered_mail_not_found","message":"The registered mail does not exist or the caller cannot see it."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `registered_mail_already_sent`, `registered_mail_canceled`, `idempotency_in_progress`, `idempotency_outcome_unknown`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"registered_mail_already_sent":{"summary":"registered_mail_already_sent","value":{"error":{"code":"registered_mail_already_sent","message":"The mail was already sent with another idempotency key, or is no longer a draft."}}},"registered_mail_canceled":{"summary":"registered_mail_canceled","value":{"error":{"code":"registered_mail_canceled","message":"The registered mail was canceled."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with the same `Idempotency-Key` is still running: retry a little later."}}},"idempotency_outcome_unknown":{"summary":"idempotency_outcome_unknown","value":{"error":{"code":"idempotency_outcome_unknown","message":"The request with the same `Idempotency-Key` was interrupted and its outcome is unknown (it is never run twice): check the resource, then retry with a new key."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`, `recipients_required`, `sender_account_required`, `sender_account_not_verified`, `reference_required`, `type_not_allowed`, `vendor_not_allowed`, `attachments_limit_exceeded`, `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}},"recipients_required":{"summary":"recipients_required","value":{"error":{"code":"recipients_required","message":"At least one recipient is required to send."}}},"sender_account_required":{"summary":"sender_account_required","value":{"error":{"code":"sender_account_required","message":"A verified sender account is required to send."}}},"sender_account_not_verified":{"summary":"sender_account_not_verified","value":{"error":{"code":"sender_account_not_verified","message":"The sender account is not verified at the vendor yet."}}},"reference_required":{"summary":"reference_required","value":{"error":{"code":"reference_required","message":"The entity requires a `reference` on every registered mail."}}},"type_not_allowed":{"summary":"type_not_allowed","value":{"error":{"code":"type_not_allowed","message":"The registered mail type is not allowed by the entity settings."}}},"vendor_not_allowed":{"summary":"vendor_not_allowed","value":{"error":{"code":"vendor_not_allowed","message":"The vendor is not allowed by the entity settings (also used by registered mail)."}}},"attachments_limit_exceeded":{"summary":"attachments_limit_exceeded","value":{"error":{"code":"attachments_limit_exceeded","message":"Too many attachments, or total size above the entity limit."}}},"idempotency_key_reused":{"summary":"idempotency_key_reused","value":{"error":{"code":"idempotency_key_reused","message":"The `Idempotency-Key` was already used (within 24 hours) for a different request: use a new key."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/registered-mails/{id}/cancel":{"post":{"operationId":"cancelRegisteredMail","tags":["Registered mail"],"summary":"Cancel a registered mail draft","description":"Cancels a draft. A sent mail cannot be canceled.\n\n**Permission:** `registered_mail.send` on the target entity (API keys and people: from the role).  \n**Partner scope:** `registered_mail:write`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)."},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key of this request (e.g. a UUID), reused for its retries. For 24 hours, a retry with the same key and the same body answers the recorded response (same status and body, header `Idempotent-Replayed: true`) without running the request again; the same key with another body answers `422 idempotency_key_reused`, and while the first request is running `409 idempotency_in_progress`. A failed request releases its key. A request interrupted after it started (its outcome is unknown) is never run twice: its key answers `409 idempotency_outcome_unknown`, retry with a new key once you have checked the resource. For `multipart/form-data` uploads, the key alone identifies the request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"x-mlt-permissions":["registered_mail.send"],"x-mlt-partner-scopes":["registered_mail:write"],"responses":{"200":{"description":"The canceled mail.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisteredMail"},"example":{"id":"0192f3a1-7c2e-7b4d-9a61-500000000001","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","type":"qualified","vendor":"ar24","status":"canceled","subject":"Mise en demeure - Loyers impayés Lot 12","reference":"LRE-2026-0142","clientReference":"DOSSIER-8841","contentHtml":"<p>Madame,</p><p>Malgré nos relances, les loyers de juillet à septembre restent impayés…</p>","messageTemplate":null,"senderAccountId":"0192f3a1-7c2e-7b4d-9a61-510000000001","followers":["comptabilite@cabinet-bernard.fr"],"attachments":[],"items":[{"id":"0192f3a1-7c2e-7b4d-9a61-500000000011","recipient":{"firstName":"Marie","lastName":"Durand","email":"marie.durand@example.fr","company":null,"kind":"individual","contactId":"0192f3a1-7c2e-7b4d-9a61-600000000001"},"status":"draft","error":null,"retryable":false,"submittedAt":null,"completedAt":null,"timeline":[],"proofs":[],"recipientUpdates":[]}],"progress":{"total":1,"pending":1,"delivered":0,"refused":0,"neglected":0,"failed":0},"createdBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"},"createdAt":"2026-10-02T07:55:00.000Z","sentAt":null,"version":1}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `registered_mail_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"registered_mail_not_found":{"summary":"registered_mail_not_found","value":{"error":{"code":"registered_mail_not_found","message":"The registered mail does not exist or the caller cannot see it."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `registered_mail_not_cancelable`, `idempotency_in_progress`, `idempotency_outcome_unknown`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"registered_mail_not_cancelable":{"summary":"registered_mail_not_cancelable","value":{"error":{"code":"registered_mail_not_cancelable","message":"Only drafts can be canceled."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with the same `Idempotency-Key` is still running: retry a little later."}}},"idempotency_outcome_unknown":{"summary":"idempotency_outcome_unknown","value":{"error":{"code":"idempotency_outcome_unknown","message":"The request with the same `Idempotency-Key` was interrupted and its outcome is unknown (it is never run twice): check the resource, then retry with a new key."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_key_reused":{"summary":"idempotency_key_reused","value":{"error":{"code":"idempotency_key_reused","message":"The `Idempotency-Key` was already used (within 24 hours) for a different request: use a new key."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/registered-mails/{id}/items/{itemId}/retry":{"post":{"operationId":"retryRegisteredMailItem","tags":["Registered mail"],"summary":"Retry a failed item","description":"Submits again one item that failed before the vendor accepted it (`retryable: true`). Counts against the quota.\n\n**Permission:** `registered_mail.send` on the target entity (API keys and people: from the role).  \n**Partner scope:** `registered_mail:write`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)."},{"name":"itemId","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Item id."},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key of this request (e.g. a UUID), reused for its retries. For 24 hours, a retry with the same key and the same body answers the recorded response (same status and body, header `Idempotent-Replayed: true`) without running the request again; the same key with another body answers `422 idempotency_key_reused`, and while the first request is running `409 idempotency_in_progress`. A failed request releases its key. A request interrupted after it started (its outcome is unknown) is never run twice: its key answers `409 idempotency_outcome_unknown`, retry with a new key once you have checked the resource. For `multipart/form-data` uploads, the key alone identifies the request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"x-mlt-permissions":["registered_mail.send"],"x-mlt-partner-scopes":["registered_mail:write"],"responses":{"200":{"description":"The registered mail.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisteredMail"},"example":{"id":"0192f3a1-7c2e-7b4d-9a61-500000000001","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","type":"qualified","vendor":"ar24","status":"in_progress","subject":"Mise en demeure - Loyers impayés Lot 12","reference":"LRE-2026-0142","clientReference":"DOSSIER-8841","contentHtml":"<p>Madame,</p><p>Malgré nos relances, les loyers de juillet à septembre restent impayés…</p>","messageTemplate":null,"senderAccountId":"0192f3a1-7c2e-7b4d-9a61-510000000001","followers":["comptabilite@cabinet-bernard.fr"],"attachments":[{"id":"0192f3a1-7c2e-7b4d-9a61-500000000021","name":"mise-en-demeure.pdf","sizeBytes":182340,"sha256":"3f79bb7b435b05321651daefd374cdc681dc06faa65e374e38337b88ca046dea"}],"items":[{"id":"0192f3a1-7c2e-7b4d-9a61-500000000011","recipient":{"firstName":"Marie","lastName":"Durand","email":"marie.durand@example.fr","company":null,"kind":"individual","contactId":"0192f3a1-7c2e-7b4d-9a61-600000000001"},"status":"deposited","error":null,"retryable":false,"submittedAt":"2026-10-02T08:00:03.000Z","completedAt":null,"timeline":[{"status":"sent","at":"2026-10-02T08:00:03.000Z","source":"system","detail":null},{"status":"deposited","at":"2026-10-02T08:00:41.000Z","source":"vendor","detail":null}],"proofs":[{"kind":"deposit","sha256":"9b74c9897bac770ffc029102a200c5de0f1a4f5b8c9a1b2c3d4e5f60718293a4","sizeBytes":60211,"storedAt":"2026-10-02T08:01:10.000Z"}],"recipientUpdates":[]}],"progress":{"total":1,"pending":1,"delivered":0,"refused":0,"neglected":0,"failed":0},"createdBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"},"createdAt":"2026-10-02T07:55:00.000Z","sentAt":"2026-10-02T08:00:03.000Z","version":2}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`, `quota_exceeded`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}},"quota_exceeded":{"summary":"quota_exceeded","value":{"error":{"code":"quota_exceeded","message":"The quota of the organization or entity is reached and set to block (see the `options` endpoints)."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `registered_mail_not_found`, `registered_mail_item_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"registered_mail_not_found":{"summary":"registered_mail_not_found","value":{"error":{"code":"registered_mail_not_found","message":"The registered mail does not exist or the caller cannot see it."}}},"registered_mail_item_not_found":{"summary":"registered_mail_item_not_found","value":{"error":{"code":"registered_mail_item_not_found","message":"Unknown item for this registered mail."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `registered_mail_item_not_retryable`, `idempotency_in_progress`, `idempotency_outcome_unknown`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"registered_mail_item_not_retryable":{"summary":"registered_mail_item_not_retryable","value":{"error":{"code":"registered_mail_item_not_retryable","message":"Only items that failed before the vendor accepted them can be retried."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with the same `Idempotency-Key` is still running: retry a little later."}}},"idempotency_outcome_unknown":{"summary":"idempotency_outcome_unknown","value":{"error":{"code":"idempotency_outcome_unknown","message":"The request with the same `Idempotency-Key` was interrupted and its outcome is unknown (it is never run twice): check the resource, then retry with a new key."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_key_reused":{"summary":"idempotency_key_reused","value":{"error":{"code":"idempotency_key_reused","message":"The `Idempotency-Key` was already used (within 24 hours) for a different request: use a new key."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/registered-mails/{id}/items/{itemId}/proofs/{kind}":{"get":{"operationId":"downloadRegisteredMailProof","tags":["Registered mail"],"summary":"Download a proof","description":"Downloads a legal proof of an item: `deposit`, `delivery`, `refusal`, `negligence` or `content`. The SHA-256 of each stored proof is listed in `items[].proofs`.\n\n**Permission:** `registered_mail.read` on the target entity (API keys and people: from the role).  \n**Partner scope:** `registered_mail:read`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)."},{"name":"itemId","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Item id."},{"name":"kind","required":true,"in":"path","schema":{"type":"string"},"description":"Proof kind: `deposit`, `delivery`, `refusal`, `negligence` or `content`."}],"x-mlt-permissions":["registered_mail.read"],"x-mlt-partner-scopes":["registered_mail:read"],"responses":{"200":{"description":"The proof PDF.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `registered_mail_not_found`, `registered_mail_item_not_found`, `registered_mail_proof_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"registered_mail_not_found":{"summary":"registered_mail_not_found","value":{"error":{"code":"registered_mail_not_found","message":"The registered mail does not exist or the caller cannot see it."}}},"registered_mail_item_not_found":{"summary":"registered_mail_item_not_found","value":{"error":{"code":"registered_mail_item_not_found","message":"Unknown item for this registered mail."}}},"registered_mail_proof_not_found":{"summary":"registered_mail_proof_not_found","value":{"error":{"code":"registered_mail_proof_not_found","message":"This proof is not available (yet) for the item."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}},"/v1/registered-mails/{id}/items/{itemId}/recipient-updates/{updateId}":{"post":{"operationId":"answerRecipientUpdate","tags":["Registered mail"],"summary":"Answer a recipient email change","description":"A recipient may ask to receive the mail at another address (`items[].recipientUpdates`). Accept or refuse the request.\n\n**Permission:** `registered_mail.send` on the target entity (API keys and people: from the role).  \n**Partner scope:** `registered_mail:write`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)."},{"name":"itemId","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Item id."},{"name":"updateId","required":true,"in":"path","schema":{"type":"string","format":"uuid"},"description":"Id of the email change request."},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key of this request (e.g. a UUID), reused for its retries. For 24 hours, a retry with the same key and the same body answers the recorded response (same status and body, header `Idempotent-Replayed: true`) without running the request again; the same key with another body answers `422 idempotency_key_reused`, and while the first request is running `409 idempotency_in_progress`. A failed request releases its key. A request interrupted after it started (its outcome is unknown) is never run twice: its key answers `409 idempotency_outcome_unknown`, retry with a new key once you have checked the resource. For `multipart/form-data` uploads, the key alone identifies the request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"x-mlt-permissions":["registered_mail.send"],"x-mlt-partner-scopes":["registered_mail:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerRecipientUpdateBody"},"example":{"accept":true}}}},"responses":{"200":{"description":"The registered mail.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisteredMail"},"example":{"id":"0192f3a1-7c2e-7b4d-9a61-500000000001","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","type":"qualified","vendor":"ar24","status":"in_progress","subject":"Mise en demeure - Loyers impayés Lot 12","reference":"LRE-2026-0142","clientReference":"DOSSIER-8841","contentHtml":"<p>Madame,</p><p>Malgré nos relances, les loyers de juillet à septembre restent impayés…</p>","messageTemplate":null,"senderAccountId":"0192f3a1-7c2e-7b4d-9a61-510000000001","followers":["comptabilite@cabinet-bernard.fr"],"attachments":[{"id":"0192f3a1-7c2e-7b4d-9a61-500000000021","name":"mise-en-demeure.pdf","sizeBytes":182340,"sha256":"3f79bb7b435b05321651daefd374cdc681dc06faa65e374e38337b88ca046dea"}],"items":[{"id":"0192f3a1-7c2e-7b4d-9a61-500000000011","recipient":{"firstName":"Marie","lastName":"Durand","email":"marie.durand@example.fr","company":null,"kind":"individual","contactId":"0192f3a1-7c2e-7b4d-9a61-600000000001"},"status":"deposited","error":null,"retryable":false,"submittedAt":"2026-10-02T08:00:03.000Z","completedAt":null,"timeline":[{"status":"sent","at":"2026-10-02T08:00:03.000Z","source":"system","detail":null},{"status":"deposited","at":"2026-10-02T08:00:41.000Z","source":"vendor","detail":null}],"proofs":[{"kind":"deposit","sha256":"9b74c9897bac770ffc029102a200c5de0f1a4f5b8c9a1b2c3d4e5f60718293a4","sizeBytes":60211,"storedAt":"2026-10-02T08:01:10.000Z"}],"recipientUpdates":[]}],"progress":{"total":1,"pending":1,"delivered":0,"refused":0,"neglected":0,"failed":0},"createdBy":{"id":"0192f3a1-7c2e-7b4d-9a61-300000000001","email":"claire.bernard@cabinet-bernard.fr","firstName":"Claire","lastName":"Bernard"},"createdAt":"2026-10-02T07:55:00.000Z","sentAt":"2026-10-02T08:00:03.000Z","version":2}}}},"400":{"description":"Malformed request body (not parseable). Codes: `bad_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"bad_request":{"summary":"bad_request","value":{"error":{"code":"bad_request","message":"The request body is not valid JSON (it cannot be parsed)."}}}}}}},"401":{"description":"Missing, invalid or expired credentials. Codes: `unauthenticated`, `invalid_token`, `unknown_client`, `api_key_revoked`, `api_key_expired`, `partner_app_revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unauthenticated":{"summary":"unauthenticated","value":{"error":{"code":"unauthenticated","message":"Missing or malformed `Authorization: Bearer <token>` header."}}},"invalid_token":{"summary":"invalid_token","value":{"error":{"code":"invalid_token","message":"The token is invalid, expired, or was requested without the API audience scope."}}},"unknown_client":{"summary":"unknown_client","value":{"error":{"code":"unknown_client","message":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"code":"api_key_revoked","message":"The API key was revoked."}}},"api_key_expired":{"summary":"api_key_expired","value":{"error":{"code":"api_key_expired","message":"The API key reached its expiry date."}}},"partner_app_revoked":{"summary":"partner_app_revoked","value":{"error":{"code":"partner_app_revoked","message":"The partner application was revoked."}}}}}}},"403":{"description":"Authenticated, but not allowed. Codes: `no_account`, `ip_not_allowed`, `consent_required`, `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"no_account":{"summary":"no_account","value":{"error":{"code":"no_account","message":"The token is valid but its subject has no account (or service account) in this workspace."}}},"ip_not_allowed":{"summary":"ip_not_allowed","value":{"error":{"code":"ip_not_allowed","message":"The API key has an IP allowlist and the request comes from another address."}}},"consent_required":{"summary":"consent_required","value":{"error":{"code":"consent_required","message":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens).","details":{"orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001"}}}},"forbidden":{"summary":"forbidden","value":{"error":{"code":"forbidden","message":"The caller can see the resource but lacks the permission for this action."}}}}}}},"404":{"description":"Not found, or not visible to the caller. Codes: `registered_mail_not_found`, `registered_mail_item_not_found`, `recipient_update_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"registered_mail_not_found":{"summary":"registered_mail_not_found","value":{"error":{"code":"registered_mail_not_found","message":"The registered mail does not exist or the caller cannot see it."}}},"registered_mail_item_not_found":{"summary":"registered_mail_item_not_found","value":{"error":{"code":"registered_mail_item_not_found","message":"Unknown item for this registered mail."}}},"recipient_update_not_found":{"summary":"recipient_update_not_found","value":{"error":{"code":"recipient_update_not_found","message":"Unknown recipient email change request."}}}}}}},"409":{"description":"Conflict with the current state of the resource. Codes: `recipient_update_already_answered`, `vendor_error`, `idempotency_in_progress`, `idempotency_outcome_unknown`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"recipient_update_already_answered":{"summary":"recipient_update_already_answered","value":{"error":{"code":"recipient_update_already_answered","message":"The recipient email change request was already answered."}}},"vendor_error":{"summary":"vendor_error","value":{"error":{"code":"vendor_error","message":"The registered mail vendor refused the operation or is unreachable. `message` carries the vendor reason."}}},"idempotency_in_progress":{"summary":"idempotency_in_progress","value":{"error":{"code":"idempotency_in_progress","message":"A request with the same `Idempotency-Key` is still running: retry a little later."}}},"idempotency_outcome_unknown":{"summary":"idempotency_outcome_unknown","value":{"error":{"code":"idempotency_outcome_unknown","message":"The request with the same `Idempotency-Key` was interrupted and its outcome is unknown (it is never run twice): check the resource, then retry with a new key."}}}}}}},"422":{"description":"Invalid request (schema validation) or business rule violation. Codes: `invalid_request`, `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":{"code":"invalid_request","message":"Invalid request","details":{"issues":[{"code":"invalid_type","path":["title"],"message":"Invalid input: expected string, received undefined"}]}}}},"idempotency_key_reused":{"summary":"idempotency_key_reused","value":{"error":{"code":"idempotency_key_reused","message":"The `Idempotency-Key` was already used (within 24 hours) for a different request: use a new key."}}}}}}},"429":{"description":"Rate limit exceeded. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"code":"rate_limited","message":"Too many requests, retry later","details":{"limit":600,"retryAfterSeconds":17}}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}}}}}},"webhooks":{"signature.signed":{"post":{"operationId":"webhook.signature.signed","tags":["Webhooks"],"security":[],"summary":"A signer signed","description":"Sent each time one signer of a signature request signs. The request is `completed` once every signer has signed (`signature.completed`).\n\nEvent type: `signature.signed`.","parameters":[{"name":"X-MLT-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. Verify it before trusting the payload.","schema":{"type":"string"}},{"name":"X-MLT-Event-Id","in":"header","required":true,"description":"Unique event id (same as `id` in the body). Kept across retries and replays: use it to deduplicate.","schema":{"type":"string"}},{"name":"X-MLT-Event-Type","in":"header","required":true,"description":"Event type (same as `type` in the body).","schema":{"type":"string"}},{"name":"X-MLT-Delivery-Id","in":"header","required":true,"description":"Id of this delivery (one per event and subscription).","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"signature.signed"},"data":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid"},"title":{"type":"string"},"signerId":{"type":"string","format":"uuid"},"signerName":{"type":"string"}},"required":["requestId","title","signerId","signerName"]}}}]},"example":{"id":"0192f3b0-12c4-7e8a-b3d1-5f6a7b8c9d0e","type":"signature.signed","apiVersion":"1","createdAt":"2026-10-01T10:12:45.000Z","providerId":"0192f3a1-7c2e-7b4d-9a61-100000000001","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","data":{"requestId":"0192f3a1-7c2e-7b4d-9a61-400000000001","title":"Bail - Lot 12","signerId":"0192f3a1-7c2e-7b4d-9a61-400000000011","signerName":"Marie Durand"}}}}},"responses":{"2XX":{"description":"Acknowledge within 10 seconds. Any other status, a timeout or a redirect is a failure and is retried."}}}},"signature.completed":{"post":{"operationId":"webhook.signature.completed","tags":["Webhooks"],"security":[],"summary":"Signature request completed","description":"Every signer signed and the signed document is available (`GET /v1/signature-requests/{id}/document?variant=signed`).\n\nEvent type: `signature.completed`.","parameters":[{"name":"X-MLT-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. Verify it before trusting the payload.","schema":{"type":"string"}},{"name":"X-MLT-Event-Id","in":"header","required":true,"description":"Unique event id (same as `id` in the body). Kept across retries and replays: use it to deduplicate.","schema":{"type":"string"}},{"name":"X-MLT-Event-Type","in":"header","required":true,"description":"Event type (same as `type` in the body).","schema":{"type":"string"}},{"name":"X-MLT-Delivery-Id","in":"header","required":true,"description":"Id of this delivery (one per event and subscription).","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"signature.completed"},"data":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid"},"title":{"type":"string"}},"required":["requestId","title"]}}}]},"example":{"id":"0192f3b0-12c4-7e8a-b3d1-5f6a7b8c9d0e","type":"signature.completed","apiVersion":"1","createdAt":"2026-10-01T10:12:45.000Z","providerId":"0192f3a1-7c2e-7b4d-9a61-100000000001","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","data":{"requestId":"0192f3a1-7c2e-7b4d-9a61-400000000001","title":"Bail - Lot 12"}}}}},"responses":{"2XX":{"description":"Acknowledge within 10 seconds. Any other status, a timeout or a redirect is a failure and is retried."}}}},"signature.declined":{"post":{"operationId":"webhook.signature.declined","tags":["Webhooks"],"security":[],"summary":"A signer declined","description":"A signer declined to sign: the request is `declined` and nobody else can sign it.\n\nEvent type: `signature.declined`.","parameters":[{"name":"X-MLT-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. Verify it before trusting the payload.","schema":{"type":"string"}},{"name":"X-MLT-Event-Id","in":"header","required":true,"description":"Unique event id (same as `id` in the body). Kept across retries and replays: use it to deduplicate.","schema":{"type":"string"}},{"name":"X-MLT-Event-Type","in":"header","required":true,"description":"Event type (same as `type` in the body).","schema":{"type":"string"}},{"name":"X-MLT-Delivery-Id","in":"header","required":true,"description":"Id of this delivery (one per event and subscription).","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"signature.declined"},"data":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid"},"title":{"type":"string"},"signerId":{"type":"string","format":"uuid"},"signerName":{"type":"string"},"reason":{"type":["string","null"]}},"required":["requestId","title","signerId","signerName","reason"]}}}]},"example":{"id":"0192f3b0-12c4-7e8a-b3d1-5f6a7b8c9d0e","type":"signature.declined","apiVersion":"1","createdAt":"2026-10-01T10:12:45.000Z","providerId":"0192f3a1-7c2e-7b4d-9a61-100000000001","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","data":{"requestId":"0192f3a1-7c2e-7b4d-9a61-400000000001","title":"Bail - Lot 12","signerId":"0192f3a1-7c2e-7b4d-9a61-400000000012","signerName":"Paul Martin","reason":"Le montant du dépôt de garantie est erroné."}}}}},"responses":{"2XX":{"description":"Acknowledge within 10 seconds. Any other status, a timeout or a redirect is a failure and is retried."}}}},"signature.expired":{"post":{"operationId":"webhook.signature.expired","tags":["Webhooks"],"security":[],"summary":"Signature request expired","description":"The request reached its expiry date before every signer signed: it is `expired` and can no longer be signed.\n\nEvent type: `signature.expired`.","parameters":[{"name":"X-MLT-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. Verify it before trusting the payload.","schema":{"type":"string"}},{"name":"X-MLT-Event-Id","in":"header","required":true,"description":"Unique event id (same as `id` in the body). Kept across retries and replays: use it to deduplicate.","schema":{"type":"string"}},{"name":"X-MLT-Event-Type","in":"header","required":true,"description":"Event type (same as `type` in the body).","schema":{"type":"string"}},{"name":"X-MLT-Delivery-Id","in":"header","required":true,"description":"Id of this delivery (one per event and subscription).","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"signature.expired"},"data":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid"},"title":{"type":"string"}},"required":["requestId","title"]}}}]},"example":{"id":"0192f3b0-12c4-7e8a-b3d1-5f6a7b8c9d0e","type":"signature.expired","apiVersion":"1","createdAt":"2026-10-01T10:12:45.000Z","providerId":"0192f3a1-7c2e-7b4d-9a61-100000000001","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","data":{"requestId":"0192f3a1-7c2e-7b4d-9a61-400000000001","title":"Bail - Lot 12"}}}}},"responses":{"2XX":{"description":"Acknowledge within 10 seconds. Any other status, a timeout or a redirect is a failure and is retried."}}}},"signature.canceled":{"post":{"operationId":"webhook.signature.canceled","tags":["Webhooks"],"security":[],"summary":"Signature request canceled","description":"The request was canceled by its organization: it is `canceled` and can no longer be signed.\n\nEvent type: `signature.canceled`.","parameters":[{"name":"X-MLT-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. Verify it before trusting the payload.","schema":{"type":"string"}},{"name":"X-MLT-Event-Id","in":"header","required":true,"description":"Unique event id (same as `id` in the body). Kept across retries and replays: use it to deduplicate.","schema":{"type":"string"}},{"name":"X-MLT-Event-Type","in":"header","required":true,"description":"Event type (same as `type` in the body).","schema":{"type":"string"}},{"name":"X-MLT-Delivery-Id","in":"header","required":true,"description":"Id of this delivery (one per event and subscription).","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"signature.canceled"},"data":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid"},"title":{"type":"string"}},"required":["requestId","title"]}}}]},"example":{"id":"0192f3b0-12c4-7e8a-b3d1-5f6a7b8c9d0e","type":"signature.canceled","apiVersion":"1","createdAt":"2026-10-01T10:12:45.000Z","providerId":"0192f3a1-7c2e-7b4d-9a61-100000000001","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","data":{"requestId":"0192f3a1-7c2e-7b4d-9a61-400000000001","title":"Bail - Lot 12"}}}}},"responses":{"2XX":{"description":"Acknowledge within 10 seconds. Any other status, a timeout or a redirect is a failure and is retried."}}}},"registered_mail.delivered":{"post":{"operationId":"webhook.registered_mail.delivered","tags":["Webhooks"],"security":[],"summary":"Registered mail delivered","description":"The recipient accepted the registered mail. The delivery proof becomes downloadable.\n\nEvent type: `registered_mail.delivered`.","parameters":[{"name":"X-MLT-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. Verify it before trusting the payload.","schema":{"type":"string"}},{"name":"X-MLT-Event-Id","in":"header","required":true,"description":"Unique event id (same as `id` in the body). Kept across retries and replays: use it to deduplicate.","schema":{"type":"string"}},{"name":"X-MLT-Event-Type","in":"header","required":true,"description":"Event type (same as `type` in the body).","schema":{"type":"string"}},{"name":"X-MLT-Delivery-Id","in":"header","required":true,"description":"Id of this delivery (one per event and subscription).","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"registered_mail.delivered"},"data":{"type":"object","properties":{"mailId":{"type":"string","format":"uuid"},"itemId":{"type":"string","format":"uuid"},"status":{"type":"string","const":"delivered"},"reference":{"type":["string","null"]},"entityId":{"type":"string","format":"uuid"}},"required":["mailId","itemId","status","reference","entityId"]}}}]},"example":{"id":"0192f3b0-12c4-7e8a-b3d1-5f6a7b8c9d0e","type":"registered_mail.delivered","apiVersion":"1","createdAt":"2026-10-01T10:12:45.000Z","providerId":"0192f3a1-7c2e-7b4d-9a61-100000000001","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","data":{"mailId":"0192f3a1-7c2e-7b4d-9a61-500000000001","itemId":"0192f3a1-7c2e-7b4d-9a61-500000000011","status":"delivered","reference":"LRE-2026-0142","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002"}}}}},"responses":{"2XX":{"description":"Acknowledge within 10 seconds. Any other status, a timeout or a redirect is a failure and is retried."}}}},"registered_mail.refused":{"post":{"operationId":"webhook.registered_mail.refused","tags":["Webhooks"],"security":[],"summary":"Registered mail refused","description":"The recipient explicitly refused the registered mail.\n\nEvent type: `registered_mail.refused`.","parameters":[{"name":"X-MLT-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. Verify it before trusting the payload.","schema":{"type":"string"}},{"name":"X-MLT-Event-Id","in":"header","required":true,"description":"Unique event id (same as `id` in the body). Kept across retries and replays: use it to deduplicate.","schema":{"type":"string"}},{"name":"X-MLT-Event-Type","in":"header","required":true,"description":"Event type (same as `type` in the body).","schema":{"type":"string"}},{"name":"X-MLT-Delivery-Id","in":"header","required":true,"description":"Id of this delivery (one per event and subscription).","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"registered_mail.refused"},"data":{"type":"object","properties":{"mailId":{"type":"string","format":"uuid"},"itemId":{"type":"string","format":"uuid"},"status":{"type":"string","const":"refused"},"reference":{"type":["string","null"]},"entityId":{"type":"string","format":"uuid"}},"required":["mailId","itemId","status","reference","entityId"]}}}]},"example":{"id":"0192f3b0-12c4-7e8a-b3d1-5f6a7b8c9d0e","type":"registered_mail.refused","apiVersion":"1","createdAt":"2026-10-01T10:12:45.000Z","providerId":"0192f3a1-7c2e-7b4d-9a61-100000000001","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","data":{"mailId":"0192f3a1-7c2e-7b4d-9a61-500000000001","itemId":"0192f3a1-7c2e-7b4d-9a61-500000000011","status":"refused","reference":"LRE-2026-0142","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002"}}}}},"responses":{"2XX":{"description":"Acknowledge within 10 seconds. Any other status, a timeout or a redirect is a failure and is retried."}}}},"registered_mail.neglected":{"post":{"operationId":"webhook.registered_mail.neglected","tags":["Webhooks"],"security":[],"summary":"Registered mail neglected","description":"The recipient did not accept the registered mail within the legal period.\n\nEvent type: `registered_mail.neglected`.","parameters":[{"name":"X-MLT-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. Verify it before trusting the payload.","schema":{"type":"string"}},{"name":"X-MLT-Event-Id","in":"header","required":true,"description":"Unique event id (same as `id` in the body). Kept across retries and replays: use it to deduplicate.","schema":{"type":"string"}},{"name":"X-MLT-Event-Type","in":"header","required":true,"description":"Event type (same as `type` in the body).","schema":{"type":"string"}},{"name":"X-MLT-Delivery-Id","in":"header","required":true,"description":"Id of this delivery (one per event and subscription).","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"registered_mail.neglected"},"data":{"type":"object","properties":{"mailId":{"type":"string","format":"uuid"},"itemId":{"type":"string","format":"uuid"},"status":{"type":"string","const":"neglected"},"reference":{"type":["string","null"]},"entityId":{"type":"string","format":"uuid"}},"required":["mailId","itemId","status","reference","entityId"]}}}]},"example":{"id":"0192f3b0-12c4-7e8a-b3d1-5f6a7b8c9d0e","type":"registered_mail.neglected","apiVersion":"1","createdAt":"2026-10-01T10:12:45.000Z","providerId":"0192f3a1-7c2e-7b4d-9a61-100000000001","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","data":{"mailId":"0192f3a1-7c2e-7b4d-9a61-500000000001","itemId":"0192f3a1-7c2e-7b4d-9a61-500000000011","status":"neglected","reference":"LRE-2026-0142","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002"}}}}},"responses":{"2XX":{"description":"Acknowledge within 10 seconds. Any other status, a timeout or a redirect is a failure and is retried."}}}},"registered_mail.failed":{"post":{"operationId":"webhook.registered_mail.failed","tags":["Webhooks"],"security":[],"summary":"Registered mail failed","description":"The item could not be delivered: the email bounced (`status: bounced`) or the vendor refused the item (`status: failed`).\n\nEvent type: `registered_mail.failed`.","parameters":[{"name":"X-MLT-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. Verify it before trusting the payload.","schema":{"type":"string"}},{"name":"X-MLT-Event-Id","in":"header","required":true,"description":"Unique event id (same as `id` in the body). Kept across retries and replays: use it to deduplicate.","schema":{"type":"string"}},{"name":"X-MLT-Event-Type","in":"header","required":true,"description":"Event type (same as `type` in the body).","schema":{"type":"string"}},{"name":"X-MLT-Delivery-Id","in":"header","required":true,"description":"Id of this delivery (one per event and subscription).","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"registered_mail.failed"},"data":{"type":"object","properties":{"mailId":{"type":"string","format":"uuid"},"itemId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["bounced","failed"]},"reference":{"type":["string","null"]},"entityId":{"type":"string","format":"uuid"}},"required":["mailId","itemId","status","reference","entityId"]}}}]},"example":{"id":"0192f3b0-12c4-7e8a-b3d1-5f6a7b8c9d0e","type":"registered_mail.failed","apiVersion":"1","createdAt":"2026-10-01T10:12:45.000Z","providerId":"0192f3a1-7c2e-7b4d-9a61-100000000001","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","data":{"mailId":"0192f3a1-7c2e-7b4d-9a61-500000000001","itemId":"0192f3a1-7c2e-7b4d-9a61-500000000011","status":"bounced","reference":"LRE-2026-0142","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002"}}}}},"responses":{"2XX":{"description":"Acknowledge within 10 seconds. Any other status, a timeout or a redirect is a failure and is retried."}}}},"task.created":{"post":{"operationId":"webhook.task.created","tags":["Webhooks"],"security":[],"summary":"Task created","description":"A task was created (by a person, an integration or automatically).\n\nEvent type: `task.created`.","parameters":[{"name":"X-MLT-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. Verify it before trusting the payload.","schema":{"type":"string"}},{"name":"X-MLT-Event-Id","in":"header","required":true,"description":"Unique event id (same as `id` in the body). Kept across retries and replays: use it to deduplicate.","schema":{"type":"string"}},{"name":"X-MLT-Event-Type","in":"header","required":true,"description":"Event type (same as `type` in the body).","schema":{"type":"string"}},{"name":"X-MLT-Delivery-Id","in":"header","required":true,"description":"Id of this delivery (one per event and subscription).","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"task.created"},"data":{"type":"object","properties":{"taskId":{"type":"string","format":"uuid"},"title":{"type":"string"},"entityId":{"type":"string","format":"uuid"},"assigneeId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"startAt":{"type":"string","format":"date-time"}},"required":["taskId","title","entityId","assigneeId","startAt"]}}}]},"example":{"id":"0192f3b0-12c4-7e8a-b3d1-5f6a7b8c9d0e","type":"task.created","apiVersion":"1","createdAt":"2026-10-01T10:12:45.000Z","providerId":"0192f3a1-7c2e-7b4d-9a61-100000000001","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","data":{"taskId":"0192f3a1-7c2e-7b4d-9a61-700000000001","title":"Relancer Marie Durand - état des lieux","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","assigneeId":"0192f3a1-7c2e-7b4d-9a61-300000000003","startAt":"2026-10-06T07:00:00.000Z"}}}}},"responses":{"2XX":{"description":"Acknowledge within 10 seconds. Any other status, a timeout or a redirect is a failure and is retried."}}}},"task.completed":{"post":{"operationId":"webhook.task.completed","tags":["Webhooks"],"security":[],"summary":"Task occurrence completed","description":"An occurrence of a task was marked as done. Recurring tasks send one event per completed occurrence.\n\nEvent type: `task.completed`.","parameters":[{"name":"X-MLT-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. Verify it before trusting the payload.","schema":{"type":"string"}},{"name":"X-MLT-Event-Id","in":"header","required":true,"description":"Unique event id (same as `id` in the body). Kept across retries and replays: use it to deduplicate.","schema":{"type":"string"}},{"name":"X-MLT-Event-Type","in":"header","required":true,"description":"Event type (same as `type` in the body).","schema":{"type":"string"}},{"name":"X-MLT-Delivery-Id","in":"header","required":true,"description":"Id of this delivery (one per event and subscription).","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"task.completed"},"data":{"type":"object","properties":{"taskId":{"type":"string","format":"uuid"},"title":{"type":"string"},"entityId":{"type":"string","format":"uuid"},"occurrenceAt":{"type":"string","format":"date-time"},"completedBy":{"type":"string","format":"uuid"}},"required":["taskId","title","entityId","occurrenceAt","completedBy"]}}}]},"example":{"id":"0192f3b0-12c4-7e8a-b3d1-5f6a7b8c9d0e","type":"task.completed","apiVersion":"1","createdAt":"2026-10-01T10:12:45.000Z","providerId":"0192f3a1-7c2e-7b4d-9a61-100000000001","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","data":{"taskId":"0192f3a1-7c2e-7b4d-9a61-700000000001","title":"Relancer Marie Durand - état des lieux","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002","occurrenceAt":"2026-10-06T07:00:00.000Z","completedBy":"0192f3a1-7c2e-7b4d-9a61-300000000003"}}}}},"responses":{"2XX":{"description":"Acknowledge within 10 seconds. Any other status, a timeout or a redirect is a failure and is retried."}}}},"member.added":{"post":{"operationId":"webhook.member.added","tags":["Webhooks"],"security":[],"summary":"Member added","description":"A user was attached to a node of the organization (invitation, provisioning). `newAccount` is true when the user account was created by this operation.\n\nEvent type: `member.added`.","parameters":[{"name":"X-MLT-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. Verify it before trusting the payload.","schema":{"type":"string"}},{"name":"X-MLT-Event-Id","in":"header","required":true,"description":"Unique event id (same as `id` in the body). Kept across retries and replays: use it to deduplicate.","schema":{"type":"string"}},{"name":"X-MLT-Event-Type","in":"header","required":true,"description":"Event type (same as `type` in the body).","schema":{"type":"string"}},{"name":"X-MLT-Delivery-Id","in":"header","required":true,"description":"Id of this delivery (one per event and subscription).","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"member.added"},"data":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"nodeId":{"type":"string","format":"uuid"},"newAccount":{"type":"boolean"}},"required":["userId","nodeId","newAccount"]}}}]},"example":{"id":"0192f3b0-12c4-7e8a-b3d1-5f6a7b8c9d0e","type":"member.added","apiVersion":"1","createdAt":"2026-10-01T10:12:45.000Z","providerId":"0192f3a1-7c2e-7b4d-9a61-100000000001","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","data":{"userId":"0192f3a1-7c2e-7b4d-9a61-300000000003","nodeId":"0192f3a1-7c2e-7b4d-9a61-200000000004","newAccount":true}}}}},"responses":{"2XX":{"description":"Acknowledge within 10 seconds. Any other status, a timeout or a redirect is a failure and is retried."}}}},"contact.created":{"post":{"operationId":"webhook.contact.created","tags":["Webhooks"],"security":[],"summary":"Contact created","description":"A shared contact was created (manually, by import or through the API). Private contacts never trigger webhooks.\n\nEvent type: `contact.created`.","parameters":[{"name":"X-MLT-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. Verify it before trusting the payload.","schema":{"type":"string"}},{"name":"X-MLT-Event-Id","in":"header","required":true,"description":"Unique event id (same as `id` in the body). Kept across retries and replays: use it to deduplicate.","schema":{"type":"string"}},{"name":"X-MLT-Event-Type","in":"header","required":true,"description":"Event type (same as `type` in the body).","schema":{"type":"string"}},{"name":"X-MLT-Delivery-Id","in":"header","required":true,"description":"Id of this delivery (one per event and subscription).","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"contact.created"},"data":{"type":"object","properties":{"contactId":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["person","company"]},"entityId":{"type":"string","format":"uuid"}},"required":["contactId","kind","entityId"]}}}]},"example":{"id":"0192f3b0-12c4-7e8a-b3d1-5f6a7b8c9d0e","type":"contact.created","apiVersion":"1","createdAt":"2026-10-01T10:12:45.000Z","providerId":"0192f3a1-7c2e-7b4d-9a61-100000000001","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","data":{"contactId":"0192f3a1-7c2e-7b4d-9a61-600000000001","kind":"person","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002"}}}}},"responses":{"2XX":{"description":"Acknowledge within 10 seconds. Any other status, a timeout or a redirect is a failure and is retried."}}}},"contact.updated":{"post":{"operationId":"webhook.contact.updated","tags":["Webhooks"],"security":[],"summary":"Contact updated","description":"A shared contact was updated. Private contacts never trigger webhooks.\n\nEvent type: `contact.updated`.","parameters":[{"name":"X-MLT-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. Verify it before trusting the payload.","schema":{"type":"string"}},{"name":"X-MLT-Event-Id","in":"header","required":true,"description":"Unique event id (same as `id` in the body). Kept across retries and replays: use it to deduplicate.","schema":{"type":"string"}},{"name":"X-MLT-Event-Type","in":"header","required":true,"description":"Event type (same as `type` in the body).","schema":{"type":"string"}},{"name":"X-MLT-Delivery-Id","in":"header","required":true,"description":"Id of this delivery (one per event and subscription).","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"contact.updated"},"data":{"type":"object","properties":{"contactId":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["person","company"]},"entityId":{"type":"string","format":"uuid"}},"required":["contactId","kind","entityId"]}}}]},"example":{"id":"0192f3b0-12c4-7e8a-b3d1-5f6a7b8c9d0e","type":"contact.updated","apiVersion":"1","createdAt":"2026-10-01T10:12:45.000Z","providerId":"0192f3a1-7c2e-7b4d-9a61-100000000001","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","data":{"contactId":"0192f3a1-7c2e-7b4d-9a61-600000000001","kind":"person","entityId":"0192f3a1-7c2e-7b4d-9a61-200000000002"}}}}},"responses":{"2XX":{"description":"Acknowledge within 10 seconds. Any other status, a timeout or a redirect is a failure and is retried."}}}},"webhook.test":{"post":{"operationId":"webhook.webhook.test","tags":["Webhooks"],"security":[],"summary":"Test event","description":"Sent by the **Send a test event** action of a subscription (Settings > Integrations > Webhooks). It cannot be subscribed to.\n\nEvent type: `webhook.test`.","parameters":[{"name":"X-MLT-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. Verify it before trusting the payload.","schema":{"type":"string"}},{"name":"X-MLT-Event-Id","in":"header","required":true,"description":"Unique event id (same as `id` in the body). Kept across retries and replays: use it to deduplicate.","schema":{"type":"string"}},{"name":"X-MLT-Event-Type","in":"header","required":true,"description":"Event type (same as `type` in the body).","schema":{"type":"string"}},{"name":"X-MLT-Delivery-Id","in":"header","required":true,"description":"Id of this delivery (one per event and subscription).","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"webhook.test"},"data":{"type":"object","properties":{"message":{"type":"string"},"subscriptionId":{"type":"string","format":"uuid"}},"required":["message","subscriptionId"]}}}]},"example":{"id":"0192f3b0-12c4-7e8a-b3d1-5f6a7b8c9d0e","type":"webhook.test","apiVersion":"1","createdAt":"2026-10-01T10:12:45.000Z","providerId":"0192f3a1-7c2e-7b4d-9a61-100000000001","orgId":"0192f3a1-7c2e-7b4d-9a61-200000000001","data":{"message":"Test event from MyCLM","subscriptionId":"0192f3a1-7c2e-7b4d-9a61-900000000001"}}}}},"responses":{"2XX":{"description":"Acknowledge within 10 seconds. Any other status, a timeout or a redirect is a failure and is retried."}}}}},"components":{"schemas":{"CreateSignatureRequestData":{"type":"object","properties":{"entityId":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":200},"message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"messageTemplate":{"anyOf":[{"type":"object","properties":{"resourceId":{"type":"string","format":"uuid"},"versionId":{"type":"string","format":"uuid"}},"required":["resourceId","versionId"]},{"type":"null"}]},"signers":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":80},"lastName":{"type":"string","minLength":1,"maxLength":80},"email":{"type":"string","format":"email"},"phone":{"anyOf":[{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"},{"type":"null"}]},"contactId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["firstName","lastName","email"]}},"expiresInDays":{"type":"integer","minimum":1,"maximum":365},"vendor":{"type":"string","enum":["yousign"]},"level":{"type":"string","enum":["SES","AES","QES"]},"authMethod":{"type":"string","enum":["none","email_otp","sms_otp"]},"signingOrder":{"type":"string","enum":["parallel","sequential"]}},"required":["entityId","title","signers"]},"ImportContactsData":{"type":"object","properties":{"entityId":{"type":"string","format":"uuid"},"mapping":{"type":"object","propertyNames":{"type":"string","enum":["kind","civility","firstName","lastName","companyName","jobTitle","email","otherEmails","mobilePhone","phone","siren","siret","addressLine1","addressLine2","postalCode","city","country","recipientStatus","tags","notes","externalRef"]},"additionalProperties":{"type":"string","minLength":1,"maxLength":200}},"onDuplicate":{"default":"skip","type":"string","enum":["skip","create"]},"isPrivate":{"default":false,"type":"boolean"},"tags":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"dryRun":{"default":false,"type":"boolean"}},"required":["entityId","mapping"]},"CreateNodeBody":{"type":"object","properties":{"parentId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["entity","group"]},"name":{"type":"string","minLength":1,"maxLength":120}},"required":["parentId","type","name"]},"RenameNodeBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["name"]},"InviteMemberBody":{"type":"object","properties":{"email":{"type":"string","format":"email"},"firstName":{"type":"string","minLength":1,"maxLength":80},"lastName":{"type":"string","minLength":1,"maxLength":80},"locale":{"type":"string","enum":["fr","en"]},"nodeId":{"type":"string","format":"uuid"},"roleId":{"type":"string","format":"uuid"}},"required":["email","firstName","lastName","nodeId","roleId"]},"UpdateMembershipBody":{"type":"object","properties":{"roleId":{"type":"string","format":"uuid"},"nodeId":{"type":"string","format":"uuid"}}},"ExchangeCodeBody":{"type":"object","properties":{"code":{"type":"string","minLength":20,"maxLength":200},"redirectUri":{"type":"string","minLength":1,"maxLength":500},"codeVerifier":{"type":"string","minLength":43,"maxLength":128}},"required":["code","redirectUri"]},"ProvisionOrgBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"externalId":{"type":"string","minLength":1,"maxLength":120},"firstEntity":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"externalId":{"type":"string","minLength":1,"maxLength":120}},"required":["name"]},"owner":{"type":"object","properties":{"email":{"type":"string","maxLength":255,"format":"email"},"firstName":{"type":"string","minLength":1,"maxLength":80},"lastName":{"type":"string","minLength":1,"maxLength":80},"locale":{"default":"fr","type":"string","enum":["fr","en"]},"externalId":{"type":"string","minLength":1,"maxLength":120},"sendInvitation":{"default":true,"type":"boolean"}},"required":["email","firstName","lastName"]}},"required":["name","firstEntity","owner"]},"ProvisionNodeBody":{"type":"object","properties":{"parentId":{"type":"string","format":"uuid"},"parentExternalId":{"type":"string","minLength":1,"maxLength":120},"type":{"type":"string","enum":["entity","group"]},"name":{"type":"string","minLength":1,"maxLength":120},"externalId":{"type":"string","minLength":1,"maxLength":120}},"required":["type","name"]},"ProvisionMemberBody":{"type":"object","properties":{"email":{"type":"string","maxLength":255,"format":"email"},"firstName":{"type":"string","minLength":1,"maxLength":80},"lastName":{"type":"string","minLength":1,"maxLength":80},"locale":{"default":"fr","type":"string","enum":["fr","en"]},"externalId":{"type":"string","minLength":1,"maxLength":120},"sendInvitation":{"default":true,"type":"boolean"},"nodeId":{"type":"string","format":"uuid"},"nodeExternalId":{"type":"string","minLength":1,"maxLength":120},"role":{"type":"string","minLength":1,"maxLength":80}},"required":["email","firstName","lastName","role"]},"ProvisionUpdateMembershipBody":{"type":"object","properties":{"role":{"type":"string","minLength":1,"maxLength":80},"nodeId":{"type":"string","format":"uuid"}}},"CreateTaskBody":{"type":"object","properties":{"entityId":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"priority":{"default":"medium","type":"string","enum":["low","medium","high"]},"startAt":{"type":"string","format":"date-time"},"timezone":{"default":"Europe/Paris","type":"string","minLength":1},"recurrence":{"anyOf":[{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"interval":{"default":1,"type":"integer","minimum":1,"maximum":99},"weekdays":{"minItems":1,"type":"array","items":{"type":"string","enum":["MO","TU","WE","TH","FR","SA","SU"]}},"until":{"type":"string","format":"date"},"count":{"type":"integer","minimum":1,"maximum":1000}},"required":["frequency"]},{"type":"null"}]},"reminders":{"default":[],"maxItems":5,"type":"array","items":{"type":"object","properties":{"offsetMinutes":{"type":"integer","minimum":0,"maximum":129600}},"required":["offsetMinutes"]}},"assigneeId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"contactId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["entityId","title","startAt"]},"UpdateTaskBody":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"priority":{"type":"string","enum":["low","medium","high"]},"startAt":{"type":"string","format":"date-time"},"timezone":{"type":"string","minLength":1},"recurrence":{"anyOf":[{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"interval":{"default":1,"type":"integer","minimum":1,"maximum":99},"weekdays":{"minItems":1,"type":"array","items":{"type":"string","enum":["MO","TU","WE","TH","FR","SA","SU"]}},"until":{"type":"string","format":"date"},"count":{"type":"integer","minimum":1,"maximum":1000}},"required":["frequency"]},{"type":"null"}]},"reminders":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"offsetMinutes":{"type":"integer","minimum":0,"maximum":129600}},"required":["offsetMinutes"]}},"assigneeId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"contactId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}}},"SetOccurrenceStatusBody":{"type":"object","properties":{"occurrenceAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["todo","done"]},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["occurrenceAt","status"]},"SkipOccurrenceBody":{"type":"object","properties":{"occurrenceAt":{"type":"string","format":"date-time"},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["occurrenceAt"]},"CreateContactBody":{"type":"object","properties":{"entityId":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["person","company"]},"civility":{"anyOf":[{"type":"string","enum":["mr","mrs"]},{"type":"null"}]},"firstName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"companyName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"companyId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"jobTitle":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"siren":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"siret":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":254,"format":"email"},{"type":"null"}]},"otherEmails":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","maxLength":254,"format":"email"}},"mobilePhone":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"address":{"anyOf":[{"type":"object","properties":{"line1":{"default":"","type":"string","maxLength":200},"line2":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"postalCode":{"default":"","type":"string","maxLength":20},"city":{"default":"","type":"string","maxLength":120},"country":{"type":"string","minLength":2,"maxLength":2}}},{"type":"null"}]},"recipientStatus":{"default":"professional","type":"string","enum":["professional","individual"]},"tags":{"default":[],"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"externalRef":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"isPrivate":{"default":false,"type":"boolean"}},"required":["entityId","kind"]},"UpdateContactBody":{"type":"object","properties":{"civility":{"anyOf":[{"type":"string","enum":["mr","mrs"]},{"type":"null"}]},"firstName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"companyName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"companyId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"jobTitle":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"siren":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"siret":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":254,"format":"email"},{"type":"null"}]},"mobilePhone":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"address":{"anyOf":[{"type":"object","properties":{"line1":{"default":"","type":"string","maxLength":200},"line2":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"postalCode":{"default":"","type":"string","maxLength":20},"city":{"default":"","type":"string","maxLength":120},"country":{"type":"string","minLength":2,"maxLength":2}}},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"externalRef":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"otherEmails":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":254,"format":"email"}},"tags":{"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"recipientStatus":{"type":"string","enum":["professional","individual"]},"isPrivate":{"type":"boolean"},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}}},"MergeContactsBody":{"type":"object","properties":{"sourceId":{"type":"string","format":"uuid"},"takeFromSource":{"default":[],"type":"array","items":{"type":"string","enum":["civility","firstName","lastName","companyName","companyId","jobTitle","siren","siret","email","mobilePhone","phone","address","recipientStatus","notes","externalRef"]}}},"required":["sourceId"]},"CreateSenderAccountBody":{"type":"object","properties":{"entityId":{"type":"string","format":"uuid"},"mode":{"type":"string","enum":["create","link"]},"vendor":{"type":"string","enum":["ar24","local"]},"label":{"type":"string","minLength":1,"maxLength":120},"email":{"type":"string","format":"email"},"firstName":{"type":"string","minLength":1,"maxLength":80},"lastName":{"type":"string","minLength":1,"maxLength":80},"company":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]},"kind":{"default":"professional","type":"string","enum":["individual","professional"]},"address":{"type":"object","properties":{"line1":{"type":"string","minLength":1,"maxLength":200},"zipCode":{"type":"string","minLength":1,"maxLength":20},"city":{"type":"string","minLength":1,"maxLength":120},"country":{"default":"FR","type":"string","minLength":2,"maxLength":2}},"required":["line1","zipCode","city"]}},"required":["entityId","mode","label","email","firstName","lastName"]},"SetSenderOtpSecretBody":{"type":"object","properties":{"secret":{"type":"string"}},"required":["secret"]},"CreateRegisteredMailBody":{"type":"object","properties":{"entityId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["qualified","simple"]},"subject":{"type":"string","minLength":1,"maxLength":200},"reference":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"clientReference":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"contentHtml":{"default":"","type":"string","maxLength":100000},"messageTemplate":{"anyOf":[{"type":"object","properties":{"resourceId":{"type":"string","format":"uuid"},"versionId":{"type":"string","format":"uuid"}},"required":["resourceId","versionId"]},{"type":"null"}]},"senderAccountId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"recipients":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":80},"lastName":{"type":"string","minLength":1,"maxLength":80},"email":{"type":"string","format":"email"},"company":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]},"kind":{"default":"individual","type":"string","enum":["individual","professional"]},"contactId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["firstName","lastName","email"]}},"followers":{"maxItems":20,"type":"array","items":{"type":"string","format":"email"}}},"required":["entityId","subject"]},"UpdateRegisteredMailBody":{"type":"object","properties":{"type":{"type":"string","enum":["qualified","simple"]},"subject":{"type":"string","minLength":1,"maxLength":200},"reference":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"clientReference":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"contentHtml":{"type":"string","maxLength":100000},"messageTemplate":{"anyOf":[{"type":"object","properties":{"resourceId":{"type":"string","format":"uuid"},"versionId":{"type":"string","format":"uuid"}},"required":["resourceId","versionId"]},{"type":"null"}]},"senderAccountId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"recipients":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":80},"lastName":{"type":"string","minLength":1,"maxLength":80},"email":{"type":"string","format":"email"},"company":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]},"kind":{"default":"individual","type":"string","enum":["individual","professional"]},"contactId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["firstName","lastName","email"]}},"followers":{"maxItems":20,"type":"array","items":{"type":"string","format":"email"}},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}}},"SendRegisteredMailBody":{"type":"object","properties":{"idempotencyKey":{"type":"string","minLength":8,"maxLength":128}},"required":["idempotencyKey"]},"AnswerRecipientUpdateBody":{"type":"object","properties":{"accept":{"type":"boolean"}},"required":["accept"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error response has this shape. `code` is stable: branch on it, not on `message`."},"UserRef":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"firstName":{"type":"string"},"lastName":{"type":"string"},"avatarUrl":{"type":["string","null"]}},"required":["id","email","firstName","lastName"],"additionalProperties":false,"description":"A person of the workspace."},"Me":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"firstName":{"type":"string"},"lastName":{"type":"string"},"avatarUrl":{"type":["string","null"]},"locale":{"type":"string","enum":["fr","en"]},"welcomeCompletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","email","firstName","lastName","avatarUrl","locale","welcomeCompletedAt"],"additionalProperties":false},"provider":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"],"additionalProperties":false},"orgs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"logoUrl":{"type":["string","null"]},"permissions":{"type":"array","items":{"type":"string","enum":["org.manage","nodes.manage","organizations.manage","members.read","members.manage","roles.manage","features.manage","integrations.manage","quotas.manage","tasks.use","tasks.read_all","signature.read","signature.send","signature.manage","registered_mail.read","registered_mail.send","registered_mail.manage","contacts.read","contacts.write","contacts.manage","resources.manage","resources.distribute","resources.use","drive.read","drive.write","drive.manage","drive.org_manage","ai.use","ai.manage","test_mode.access"]}},"role":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"name":{"type":"string"}},"required":["id","key","name"],"additionalProperties":false},{"type":"null"}]},"features":{"type":"array","items":{"type":"string","enum":["tasks","signature","registered_mail","drive","ai"]}},"admin":{"type":"object","properties":{"sections":{"type":"array","items":{"type":"string","enum":["overview","members","structure","organizations","roles","features","quotas","integrations","resources","drive","ai","security","profile","subscription","audit"]}}},"required":["sections"],"additionalProperties":false},"parentId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"ancestorIds":{"type":"array","items":{"type":"string","format":"uuid"}},"depth":{"type":"integer","minimum":1,"maximum":9007199254740991},"contractMode":{"type":"string","enum":["own","covered"]},"access":{"type":"string","enum":["direct","inherited"]},"environment":{"type":"string","enum":["live","test"]},"twinOrgId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["id","name","logoUrl","permissions","role","features","admin","parentId","ancestorIds","depth","contractMode","access","environment","twinOrgId"],"additionalProperties":false},"description":"Organizations the principal belongs to, with the permissions and features it has there."},"scopes":{"type":"array","items":{"type":"object","properties":{"orgId":{"type":"string","format":"uuid"},"orgName":{"type":"string"},"entityId":{"type":"string","format":"uuid"},"entityName":{"type":"string"},"nodeId":{"type":"string","format":"uuid"},"permissions":{"type":"array","items":{"type":"string","enum":["org.manage","nodes.manage","organizations.manage","members.read","members.manage","roles.manage","features.manage","integrations.manage","quotas.manage","tasks.use","tasks.read_all","signature.read","signature.send","signature.manage","registered_mail.read","registered_mail.send","registered_mail.manage","contacts.read","contacts.write","contacts.manage","resources.manage","resources.distribute","resources.use","drive.read","drive.write","drive.manage","drive.org_manage","ai.use","ai.manage","test_mode.access"]}},"features":{"type":"array","items":{"type":"string","enum":["tasks","signature","registered_mail","drive","ai"]}},"role":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"name":{"type":"string"}},"required":["id","key","name"],"additionalProperties":false},{"type":"null"}]},"twinNodeId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["orgId","orgName","entityId","entityName","nodeId","permissions","features","role","twinNodeId"],"additionalProperties":false},"description":"Entities where the principal can work (create resources), with effective permissions. Use `entityId` when creating resources."},"memberships":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orgId":{"type":"string","format":"uuid"},"orgName":{"type":"string"},"node":{"$ref":"#/components/schemas/Node"},"entityName":{"type":["string","null"]},"role":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"name":{"type":"string"}},"required":["id","key","name"],"additionalProperties":false}},"required":["id","orgId","orgName","node","entityName","role"],"additionalProperties":false},"description":"Where the principal is attached, and with which role."},"blockedOrgs":{"type":"array","items":{"type":"object","properties":{"orgId":{"type":"string","format":"uuid"},"orgName":{"type":"string"},"reason":{"type":"string","enum":["mfa_required","session_expired_by_policy","security_policy_unverifiable","org_pending_deletion"]},"purgeAfter":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["orgId","orgName","reason"],"additionalProperties":false}},"supportSession":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"staffName":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"readOnly":{"type":"boolean","const":true}},"required":["id","staffName","expiresAt","readOnly"],"additionalProperties":false},{"type":"null"}]}},"required":["user","provider","orgs","scopes","memberships","blockedOrgs"],"additionalProperties":false,"description":"The authenticated principal: a person, the service account of an API key, or a person through a connected app (delegated token: the person, limited to the scopes they authorized)."},"SignatureRequest":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"entityId":{"type":"string","format":"uuid"},"title":{"type":"string"},"message":{"type":["string","null"]},"messageTemplate":{"anyOf":[{"type":"object","properties":{"resourceId":{"type":"string","format":"uuid"},"versionId":{"type":"string","format":"uuid"}},"required":["resourceId","versionId"],"additionalProperties":false},{"type":"null"}]},"status":{"type":"string","enum":["draft","sent","completed","declined","canceled","expired"],"description":"`draft`: being prepared in the app, nothing sent yet · `sent`: waiting for signatures · `completed`: everyone signed · `declined`: a signer declined · `canceled` · `expired`."},"vendor":{"type":"string","enum":["yousign"],"description":"Signature vendor that handles the request."},"level":{"type":"string","enum":["SES","AES","QES"],"description":"eIDAS level: `SES` (simple), `AES` (advanced), `QES` (qualified)."},"authMethod":{"type":"string","enum":["none","email_otp","sms_otp"],"description":"How signers prove their identity before signing."},"signingOrder":{"type":"string","enum":["parallel","sequential"],"description":"`parallel`: every signer is invited at once · `sequential`: in the order of `signers`."},"reminders":{"type":"object","properties":{"enabled":{"type":"boolean"},"everyDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"maxCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["enabled","everyDays","maxCount"],"additionalProperties":false},"retention":{"type":"object","properties":{"years":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"action":{"type":"string","enum":["archive","delete"]},"purgeAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"purgedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["years","action","purgeAt","purgedAt"],"additionalProperties":false},"document":{"type":"object","properties":{"name":{"type":"string"},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"signedAvailable":{"type":"boolean"},"purged":{"type":"boolean"}},"required":["name","sizeBytes","signedAvailable","purged"],"additionalProperties":false},"signers":{"type":"array","items":{"$ref":"#/components/schemas/Signer"}},"participants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["signer","follower","notary"]},"location":{"type":"string","enum":["remote","in_agency"]},"order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"otpChannel":{"type":"string","enum":["none","email","sms"]},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":["string","null"]},"contactId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"reminders":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean"},"everyDays":{"type":"integer","minimum":1,"maximum":30},"maxCount":{"type":"integer","minimum":0,"maximum":10}},"required":["enabled","everyDays","maxCount"],"additionalProperties":false},{"type":"null"}]},"status":{"anyOf":[{"type":"string","enum":["pending","processing","signed","declined"]},{"type":"null"}]},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"invitedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"signedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"declinedReason":{"type":["string","null"]},"reminderCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastRemindedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","role","location","order","otpChannel","firstName","lastName","email","phone","contactId","reminders","status","position","invitedAt","signedAt","declinedReason","reminderCount","lastRemindedAt"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"isAnnex":{"type":"boolean"},"linkedDocumentIds":{"type":"array","items":{"type":"string","format":"uuid"}},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pages":{"type":"array","items":{"type":"object","properties":{"width":{"type":"number","exclusiveMinimum":0},"height":{"type":"number","exclusiveMinimum":0},"rotation":{"anyOf":[{"type":"number","const":0},{"type":"number","const":90},{"type":"number","const":180},{"type":"number","const":270}]}},"required":["width","height","rotation"],"additionalProperties":false}},"sha256":{"type":"object","properties":{"original":{"type":"string"},"withMentions":{"type":["string","null"]},"signed":{"type":["string","null"]}},"required":["original","withMentions","signed"],"additionalProperties":false},"signedAvailable":{"type":"boolean"}},"required":["id","name","isAnnex","linkedDocumentIds","position","sizeBytes","pages","sha256","signedAvailable"],"additionalProperties":false}},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["signature","handwritten_mention"]},"participantId":{"type":"string","format":"uuid"},"documentId":{"type":"string","format":"uuid"},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"box":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"width":{"type":"number","exclusiveMinimum":0,"maximum":1},"height":{"type":"number","exclusiveMinimum":0,"maximum":1}},"required":["x","y","width","height"],"additionalProperties":false},"label":{"type":["string","null"]},"required":{"type":"boolean"},"drawing":{"anyOf":[{"type":"object","properties":{"sha256":{"type":"string"},"capturedAt":{"type":"string","format":"date-time"}},"required":["sha256","capturedAt"],"additionalProperties":false},{"type":"null"}]}},"required":["id","type","participantId","documentId","page","box","label","required","drawing"],"additionalProperties":false}},"createdBy":{"$ref":"#/components/schemas/UserRef"},"createdAt":{"type":"string","format":"date-time"},"sentAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expiresAt":{"type":"string","format":"date-time","description":"After this date, pending signers can no longer sign and the request becomes `expired`."},"cancelRequestedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["id","entityId","title","message","messageTemplate","status","vendor","level","authMethod","signingOrder","reminders","retention","document","signers","participants","documents","fields","createdBy","createdAt","sentAt","completedAt","expiresAt","cancelRequestedAt","version"],"additionalProperties":false,"description":"A document sent for electronic signature to one or more signers."},"Signer":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":["string","null"]},"contactId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Address book contact the signer was picked from, null for a manual entry."},"status":{"type":"string","enum":["pending","processing","signed","declined"]},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"0-based position (signing order in sequential mode)."},"invitedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Null while the signer has not been invited yet (sequential order, draft)."},"signedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"declinedReason":{"type":["string","null"]},"reminderCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastRemindedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","firstName","lastName","email","phone","contactId","status","position","invitedAt","signedAt","declinedReason","reminderCount","lastRemindedAt"],"additionalProperties":false},"SignatureOptions":{"type":"object","properties":{"entityId":{"type":"string","format":"uuid"},"vendors":{"type":"object","properties":{"allowed":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["yousign"]},"available":{"type":"boolean"},"capabilities":{"type":"object","properties":{"levels":{"type":"array","items":{"type":"string","enum":["SES","AES","QES"]}},"authMethods":{"type":"array","items":{"type":"string","enum":["none","email_otp","sms_otp"]}},"otpChannels":{"type":"array","items":{"type":"string","enum":["sms"]}},"ordering":{"type":"boolean"},"groups":{"type":"boolean"},"maxSigners":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"maxDocuments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"maxFileBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"otp":{"type":"object","properties":{"ttlSeconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"maxAttempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"maxSends":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minResendSeconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["ttlSeconds","maxAttempts","maxSends","minResendSeconds"],"additionalProperties":false},"fieldBox":{"type":"object","properties":{"minWidth":{"type":"number"},"maxWidth":{"type":"number"},"minHeight":{"type":"number"},"maxHeight":{"type":"number"}},"required":["minWidth","maxWidth","minHeight","maxHeight"],"additionalProperties":false}},"required":["levels","authMethods","otpChannels","ordering","groups","maxSigners","maxDocuments","maxFileBytes","otp"],"additionalProperties":false}},"required":["key","available","capabilities"],"additionalProperties":false}},"default":{"type":"string","enum":["yousign"]}},"required":["allowed","default"],"additionalProperties":false},"levels":{"type":"object","properties":{"allowed":{"type":"array","items":{"type":"string","enum":["SES","AES","QES"]}},"default":{"type":"string","enum":["SES","AES","QES"]},"supportedByVendor":{"type":"array","items":{"type":"string","enum":["SES","AES","QES"]}}},"required":["allowed","default","supportedByVendor"],"additionalProperties":false},"authMethods":{"type":"object","properties":{"allowed":{"type":"array","items":{"type":"string","enum":["none","email_otp","sms_otp"]}},"default":{"type":"string","enum":["none","email_otp","sms_otp"]},"imposed":{"type":"boolean"}},"required":["allowed","default","imposed"],"additionalProperties":false},"expiry":{"type":"object","properties":{"defaultDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"maxDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["defaultDays","maxDays"],"additionalProperties":false},"signingOrder":{"type":"object","properties":{"mode":{"type":"string","enum":["parallel","sequential","sender_choice"]},"default":{"type":"string","enum":["parallel","sequential"]}},"required":["mode","default"],"additionalProperties":false},"externalSignersAllowed":{"type":"boolean"},"notariesEnabled":{"type":"boolean"},"reminders":{"type":"object","properties":{"enabled":{"type":"boolean"},"everyDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"maxCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["enabled","everyDays","maxCount"],"additionalProperties":false},"retention":{"type":"object","properties":{"signedDocumentsYears":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"afterExpiry":{"type":"string","enum":["archive","delete"]}},"required":["signedDocumentsYears","afterExpiry"],"additionalProperties":false},"quota":{"type":"object","properties":{"limit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"remaining":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"behavior":{"anyOf":[{"type":"string","enum":["block","overage"]},{"type":"null"}]},"blocked":{"type":"boolean"}},"required":["limit","used","remaining","behavior","blocked"],"additionalProperties":false}},"required":["entityId","vendors","levels","authMethods","expiry","signingOrder","externalSignersAllowed","notariesEnabled","reminders","retention","quota"],"additionalProperties":false,"description":"Effective signature settings of an entity: what a new request may use, and the remaining quota."},"RegisteredMail":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"entityId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["qualified","simple"],"description":"`qualified`: qualified electronic registered mail (eIDAS) · `simple`: simple electronic registered mail."},"vendor":{"type":"string","enum":["ar24","local"]},"status":{"type":"string","enum":["draft","sending","in_progress","completed","partially_failed","failed","canceled"],"description":"`draft` · `sending` · `in_progress`: at least one item is not final · `completed`: every item is final and none failed · `partially_failed` · `failed` · `canceled`."},"subject":{"type":"string"},"reference":{"type":["string","null"]},"clientReference":{"type":["string","null"]},"contentHtml":{"type":"string","description":"Sanitized HTML body of the mail."},"messageTemplate":{"anyOf":[{"type":"object","properties":{"resourceId":{"type":"string","format":"uuid"},"versionId":{"type":"string","format":"uuid"}},"required":["resourceId","versionId"],"additionalProperties":false},{"type":"null"}]},"senderAccountId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"followers":{"type":"array","items":{"type":"string","format":"email"},"description":"Email addresses notified of the progress."},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/RegisteredMailAttachment"}},"items":{"type":"array","items":{"$ref":"#/components/schemas/RegisteredMailItem"}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pending":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"delivered":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"refused":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"neglected":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["total","pending","delivered","refused","neglected","failed"],"additionalProperties":false},"createdBy":{"$ref":"#/components/schemas/UserRef"},"createdAt":{"type":"string","format":"date-time"},"sentAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["id","entityId","type","vendor","status","subject","reference","clientReference","contentHtml","messageTemplate","senderAccountId","followers","attachments","items","progress","createdBy","createdAt","sentAt","version"],"additionalProperties":false,"description":"An electronic registered mail (LRE) sending. One item is created per recipient."},"RegisteredMailSummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"entityId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["qualified","simple"]},"vendor":{"type":"string","enum":["ar24","local"]},"status":{"type":"string","enum":["draft","sending","in_progress","completed","partially_failed","failed","canceled"]},"subject":{"type":"string"},"reference":{"type":["string","null"]},"clientReference":{"type":["string","null"]},"senderAccountId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pending":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"delivered":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"refused":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"neglected":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["total","pending","delivered","refused","neglected","failed"],"additionalProperties":false},"createdBy":{"$ref":"#/components/schemas/UserRef"},"createdAt":{"type":"string","format":"date-time"},"sentAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"recipients":{"type":"array","items":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string","format":"email"},"company":{"type":["string","null"]},"kind":{"type":"string","enum":["individual","professional"]},"contactId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"status":{"type":"string","enum":["draft","sending","sent","deposited","delivered","refused","neglected","bounced","failed"]}},"required":["firstName","lastName","email","company","kind","contactId","status"],"additionalProperties":false}},"attachmentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","entityId","type","vendor","status","subject","reference","clientReference","senderAccountId","progress","createdBy","createdAt","sentAt","recipients","attachmentCount"],"additionalProperties":false,"description":"Registered mail as listed (no content, timelines nor proofs)."},"RegisteredMailItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"recipient":{"$ref":"#/components/schemas/RegisteredMailRecipient"},"status":{"type":"string","enum":["draft","sending","sent","deposited","delivered","refused","neglected","bounced","failed"],"description":"`draft` → `sending` → `sent` → `deposited` → `delivered` | `refused` | `neglected` | `bounced` | `failed`."},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"retryable":{"type":"boolean","description":"The item failed before the vendor accepted it: it can be sent again."},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"timeline":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["draft","sending","sent","deposited","delivered","refused","neglected","bounced","failed"]},"at":{"type":"string","format":"date-time"},"source":{"type":"string","enum":["user","vendor","reconciliation","system"]},"detail":{"type":["string","null"]}},"required":["status","at","source","detail"],"additionalProperties":false}},"proofs":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["deposit","delivery","refusal","negligence","content"]},"sha256":{"type":"string"},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"storedAt":{"type":"string","format":"date-time"}},"required":["kind","sha256","sizeBytes","storedAt"],"additionalProperties":false},"description":"Proofs stored so far (SHA-256 fingerprint and size). Download them with the proof endpoint."},"recipientUpdates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"newEmail":{"type":"string","format":"email"},"status":{"type":"string","enum":["pending","accepted","refused"]},"requestedAt":{"type":"string","format":"date-time"},"answeredAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","newEmail","status","requestedAt","answeredAt"],"additionalProperties":false},"description":"Requests from the recipient to receive the mail at another email address."}},"required":["id","recipient","status","error","retryable","submittedAt","completedAt","timeline","proofs","recipientUpdates"],"additionalProperties":false,"description":"The sending to one recipient."},"RegisteredMailRecipient":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string","format":"email"},"company":{"type":["string","null"]},"kind":{"type":"string","enum":["individual","professional"]},"contactId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["firstName","lastName","email","company","kind","contactId"],"additionalProperties":false},"RegisteredMailAttachment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sha256":{"type":"string"}},"required":["id","name","sizeBytes","sha256"],"additionalProperties":false},"RegisteredMailOptions":{"type":"object","properties":{"entityId":{"type":"string","format":"uuid"},"enabled":{"type":"boolean"},"typesAllowed":{"type":"array","items":{"type":"string","enum":["qualified","simple"]}},"typeDefault":{"type":"string","enum":["qualified","simple"]},"vendor":{"type":"string","enum":["ar24","local"]},"referenceRequired":{"type":"boolean"},"followersDefault":{"type":"array","items":{"type":"string","format":"email"}},"attachmentsMaxCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"attachmentsMaxSizeMb":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"quota":{"type":"object","properties":{"limit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"remaining":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"blocking":{"type":"boolean"}},"required":["limit","used","remaining","blocking"],"additionalProperties":false}},"required":["entityId","enabled","typesAllowed","typeDefault","vendor","referenceRequired","followersDefault","attachmentsMaxCount","attachmentsMaxSizeMb","quota"],"additionalProperties":false,"description":"Effective registered mail settings of an entity, and the remaining quota."},"SenderAccount":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"entityId":{"type":"string","format":"uuid"},"vendor":{"type":"string","enum":["ar24","local"]},"label":{"type":"string"},"email":{"type":"string","format":"email"},"firstName":{"type":"string"},"lastName":{"type":"string"},"company":{"type":["string","null"]},"kind":{"type":"string","enum":["individual","professional"]},"verification":{"type":"string","enum":["unverified","pending","verified"]},"otpConfigured":{"type":"boolean","description":"Whether the OTP secret (eIDAS sender authentication) is set. The secret itself is never returned."},"linkedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","entityId","vendor","label","email","firstName","lastName","company","kind","verification","otpConfigured","linkedAt","createdAt"],"additionalProperties":false,"description":"Sender identity at the registered mail vendor, shared by an entity."},"Contact":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"entityId":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["person","company"]},"displayName":{"type":"string","description":"Computed name: `firstName lastName` for a person, the company name for a company."},"civility":{"anyOf":[{"type":"string","enum":["mr","mrs"]},{"type":"null"}]},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"companyName":{"type":["string","null"]},"company":{"anyOf":[{"$ref":"#/components/schemas/ContactRef"},{"type":"null"}],"description":"Person only: linked company contact (\"works at\")."},"jobTitle":{"type":["string","null"]},"siren":{"type":["string","null"]},"siret":{"type":["string","null"]},"email":{"type":["string","null"]},"otherEmails":{"type":"array","items":{"type":"string"}},"mobilePhone":{"type":["string","null"],"description":"E.164 format."},"phone":{"type":["string","null"],"description":"E.164 format."},"address":{"anyOf":[{"$ref":"#/components/schemas/PostalAddress"},{"type":"null"}]},"recipientStatus":{"type":"string","enum":["professional","individual"],"description":"Legal status of the contact as a registered mail recipient."},"tags":{"type":"array","items":{"type":"string"}},"notes":{"type":["string","null"]},"externalRef":{"type":["string","null"],"description":"Your own identifier for this contact (free text)."},"isPrivate":{"type":"boolean","description":"Private contacts are visible to their creator only (and never sent to webhooks)."},"createdBy":{"$ref":"#/components/schemas/UserRef"},"updatedBy":{"$ref":"#/components/schemas/UserRef"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"access":{"type":"object","properties":{"canEdit":{"type":"boolean"},"canDelete":{"type":"boolean"}},"required":["canEdit","canDelete"],"additionalProperties":false,"description":"What the caller may do on this contact."}},"required":["id","entityId","kind","displayName","civility","firstName","lastName","companyName","company","jobTitle","siren","siret","email","otherEmails","mobilePhone","phone","address","recipientStatus","tags","notes","externalRef","isPrivate","createdBy","updatedBy","createdAt","updatedAt","access"],"additionalProperties":false,"description":"A person or a company of the address book of an entity."},"ContactDetail":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"entityId":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["person","company"]},"displayName":{"type":"string"},"civility":{"anyOf":[{"type":"string","enum":["mr","mrs"]},{"type":"null"}]},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"companyName":{"type":["string","null"]},"company":{"anyOf":[{"$ref":"#/components/schemas/ContactRef"},{"type":"null"}]},"jobTitle":{"type":["string","null"]},"siren":{"type":["string","null"]},"siret":{"type":["string","null"]},"email":{"type":["string","null"]},"otherEmails":{"type":"array","items":{"type":"string"}},"mobilePhone":{"type":["string","null"]},"phone":{"type":["string","null"]},"address":{"anyOf":[{"$ref":"#/components/schemas/PostalAddress"},{"type":"null"}]},"recipientStatus":{"type":"string","enum":["professional","individual"]},"tags":{"type":"array","items":{"type":"string"}},"notes":{"type":["string","null"]},"externalRef":{"type":["string","null"]},"isPrivate":{"type":"boolean"},"createdBy":{"$ref":"#/components/schemas/UserRef"},"updatedBy":{"$ref":"#/components/schemas/UserRef"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"access":{"type":"object","properties":{"canEdit":{"type":"boolean"},"canDelete":{"type":"boolean"}},"required":["canEdit","canDelete"],"additionalProperties":false},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"people":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["person","company"]},"displayName":{"type":"string"},"jobTitle":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["id","kind","displayName","jobTitle","email"],"additionalProperties":false}}},"required":["id","entityId","kind","displayName","civility","firstName","lastName","companyName","company","jobTitle","siren","siret","email","otherEmails","mobilePhone","phone","address","recipientStatus","tags","notes","externalRef","isPrivate","createdBy","updatedBy","createdAt","updatedAt","access","version","people"],"additionalProperties":false,"description":"A contact with, for a company, the people linked to it."},"ContactRef":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["person","company"]},"displayName":{"type":"string"}},"required":["id","kind","displayName"],"additionalProperties":false},"PostalAddress":{"type":"object","properties":{"line1":{"default":"","type":"string","maxLength":200},"line2":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"postalCode":{"default":"","type":"string","maxLength":20},"city":{"default":"","type":"string","maxLength":120},"country":{"default":"FR"}},"required":["line1","postalCode","city","country"],"additionalProperties":false},"ContactTag":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["name","count"],"additionalProperties":false},"DuplicateMatch":{"type":"object","properties":{"contact":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["person","company"]},"displayName":{"type":"string"},"email":{"type":["string","null"]},"companyName":{"type":["string","null"]}},"required":["id","kind","displayName","email","companyName"],"additionalProperties":false},"reasons":{"type":"array","items":{"type":"string","enum":["email","siret","name"]}}},"required":["contact","reasons"],"additionalProperties":false},"CompanySuggestion":{"type":"object","properties":{"siren":{"type":"string"},"siret":{"type":["string","null"]},"name":{"type":"string"},"legalForm":{"type":["string","null"]},"nafCode":{"type":["string","null"]},"active":{"type":"boolean"},"address":{"anyOf":[{"$ref":"#/components/schemas/PostalAddress"},{"type":"null"}]}},"required":["siren","siret","name","legalForm","nafCode","active","address"],"additionalProperties":false},"ContactActivity":{"type":"object","properties":{"resourceType":{"type":"string","enum":["signature_request","registered_mail","task","document"]},"resourceId":{"type":"string","format":"uuid"},"at":{"type":"string","format":"date-time"},"title":{"type":"string"},"status":{"type":"string"},"link":{"type":"string"}},"required":["resourceType","resourceId","at","title","status","link"],"additionalProperties":false,"description":"A resource that involves the contact (signature request, registered mail, task), newest first."},"ImportReport":{"type":"object","properties":{"dryRun":{"type":"boolean"},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"duplicates":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string"},"message":{"type":"string"},"existing":{"$ref":"#/components/schemas/ContactRef"}},"required":["row","code","message"],"additionalProperties":false}},"errors":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string"},"message":{"type":"string"},"existing":{"$ref":"#/components/schemas/ContactRef"}},"required":["row","code","message"],"additionalProperties":false}},"duplicateCheckTruncated":{"type":"boolean"}},"required":["dryRun","total","created","duplicates","errors"],"additionalProperties":false,"description":"Result of a CSV import (or of a dry run)."},"Task":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"entityId":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"priority":{"type":"string","enum":["low","medium","high"]},"startAt":{"type":"string","format":"date-time","description":"Date of the (first) occurrence."},"timezone":{"type":"string","description":"IANA time zone the recurrence and reminders are computed in."},"recurrence":{"anyOf":[{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"interval":{"default":1,"type":"integer","minimum":1,"maximum":99},"weekdays":{"minItems":1,"type":"array","items":{"type":"string","enum":["MO","TU","WE","TH","FR","SA","SU"]}},"until":{"type":"string","format":"date"},"count":{"type":"integer","minimum":1,"maximum":1000}},"required":["frequency","interval"],"additionalProperties":false},{"type":"null"}],"description":"Null for a one-off task."},"reminders":{"type":"array","items":{"type":"object","properties":{"offsetMinutes":{"type":"integer","minimum":0,"maximum":129600}},"required":["offsetMinutes"],"additionalProperties":false}},"assignee":{"anyOf":[{"$ref":"#/components/schemas/UserRef"},{"type":"null"}]},"contact":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["person","company"]},"displayName":{"type":"string"}},"required":["id","kind","displayName"],"additionalProperties":false},{"type":"null"}]},"createdBy":{"$ref":"#/components/schemas/UserRef"},"createdAt":{"type":"string","format":"date-time"},"link":{"type":["string","null"],"description":"Relative link to the resource at the origin of an automated task, else null."},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["id","entityId","title","description","priority","startAt","timezone","recurrence","reminders","assignee","contact","createdBy","createdAt","link","version"],"additionalProperties":false,"description":"A task, possibly recurring, with reminders."},"TaskOccurrence":{"type":"object","properties":{"taskId":{"type":"string","format":"uuid"},"occurrenceAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["todo","done"]},"title":{"type":"string"},"priority":{"type":"string","enum":["low","medium","high"]},"recurring":{"type":"boolean"},"entityId":{"type":"string","format":"uuid"},"assignee":{"anyOf":[{"$ref":"#/components/schemas/UserRef"},{"type":"null"}]},"contact":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["person","company"]},"displayName":{"type":"string"}},"required":["id","kind","displayName"],"additionalProperties":false},{"type":"null"}]}},"required":["taskId","occurrenceAt","status","title","priority","recurring","entityId","assignee","contact"],"additionalProperties":false,"description":"One occurrence of a task in a time range."},"TaskOptions":{"type":"object","properties":{"defaultReminders":{"type":"array","items":{"type":"object","properties":{"offsetMinutes":{"type":"integer","minimum":0,"maximum":129600}},"required":["offsetMinutes"],"additionalProperties":false}},"workingHours":{"type":"object","properties":{"enabled":{"type":"boolean"},"days":{"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}},"start":{"type":"string"},"end":{"type":"string"}},"required":["enabled","days","start","end"],"additionalProperties":false}},"required":["defaultReminders","workingHours"],"additionalProperties":false},"Node":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orgId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["organization","entity","group"]},"parentId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"entityId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Entity the node belongs to (itself for an entity, null for the organization)."},"name":{"type":"string"},"parentOrgId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["id","orgId","type","parentId","entityId","name"],"additionalProperties":false,"description":"A node of the organization tree: the organization itself, an entity, or a group inside an entity."},"Role":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"name":{"type":"string"},"permissions":{"type":"array","items":{"type":"string","enum":["org.manage","nodes.manage","organizations.manage","members.read","members.manage","roles.manage","features.manage","integrations.manage","quotas.manage","tasks.use","tasks.read_all","signature.read","signature.send","signature.manage","registered_mail.read","registered_mail.send","registered_mail.manage","contacts.read","contacts.write","contacts.manage","resources.manage","resources.distribute","resources.use","drive.read","drive.write","drive.manage","drive.org_manage","ai.use","ai.manage","test_mode.access"]}},"system":{"type":"boolean"},"definedByOrgId":{"type":"string","format":"uuid"},"inherited":{"type":"boolean"},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["id","key","name","permissions","system","definedByOrgId","inherited","version"],"additionalProperties":false},"Membership":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"user":{"$ref":"#/components/schemas/UserRef"},"node":{"$ref":"#/components/schemas/Node"},"role":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"name":{"type":"string"}},"required":["id","key","name"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"}},"required":["id","user","node","role","createdAt"],"additionalProperties":false},"Member":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"user":{"$ref":"#/components/schemas/UserRef"},"node":{"$ref":"#/components/schemas/Node"},"role":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"name":{"type":"string"}},"required":["id","key","name"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["active","pending","expired"]},"invitedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"invitationExpiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"invitationResentAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"invitedBy":{"anyOf":[{"$ref":"#/components/schemas/UserRef"},{"type":"null"}]}},"required":["id","user","node","role","createdAt","status","invitedAt","invitationExpiresAt","invitationResentAt","invitedBy"],"additionalProperties":false,"description":"A membership (user attached to a node with a role) with the invitation state of the account."},"ProvisionedNode":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orgId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["organization","entity","group"]},"parentId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"name":{"type":"string"},"externalId":{"type":["string","null"]}},"required":["id","orgId","type","parentId","name","externalId"],"additionalProperties":false},"ProvisionedOrg":{"type":"object","properties":{"org":{"$ref":"#/components/schemas/ProvisionedNode"},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/ProvisionedNode"}},"created":{"type":"boolean","description":"`false` when an organization with this `externalId` already existed (idempotent call)."}},"required":["org","nodes","created"],"additionalProperties":false},"ProvisionedNodeResult":{"type":"object","properties":{"node":{"$ref":"#/components/schemas/ProvisionedNode"},"created":{"type":"boolean"}},"required":["node","created"],"additionalProperties":false},"ProvisionedMember":{"type":"object","properties":{"membershipId":{"type":"string","format":"uuid"},"userId":{"type":"string","format":"uuid"},"email":{"type":"string"},"externalId":{"type":["string","null"]},"nodeId":{"type":"string","format":"uuid"},"roleId":{"type":"string","format":"uuid"},"invited":{"type":"boolean"},"created":{"type":"boolean"}},"required":["membershipId","userId","email","externalId","nodeId","roleId","invited","created"],"additionalProperties":false},"ProvisionedUser":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"externalId":{"type":["string","null"]},"memberships":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orgId":{"type":"string","format":"uuid"},"nodeId":{"type":"string","format":"uuid"},"roleId":{"type":"string","format":"uuid"}},"required":["id","orgId","nodeId","roleId"],"additionalProperties":false}}},"required":["id","email","firstName","lastName","externalId","memberships"],"additionalProperties":false},"OAuthGrant":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"app":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"scopes":{"type":"array","items":{"type":"string","enum":["orgs:write","nodes:write","members:write","signature:read","signature:write","tasks:read","tasks:write","contacts:read","contacts:write","registered_mail:read","registered_mail:write"]}}},"required":["id","name","description","scopes"],"additionalProperties":false},"orgId":{"type":"string","format":"uuid"},"orgName":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["orgs:write","nodes:write","members:write","signature:read","signature:write","tasks:read","tasks:write","contacts:read","contacts:write","registered_mail:read","registered_mail:write"]}},"role":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"source":{"type":"string","enum":["consent","provisioned"]},"allMembers":{"type":"boolean"},"consentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"grantedBy":{"anyOf":[{"$ref":"#/components/schemas/UserRef"},{"type":"null"}]},"grantedAt":{"type":"string","format":"date-time"},"revokedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","app","orgId","orgName","scopes","role","source","allMembers","consentCount","grantedBy","grantedAt","revokedAt"],"additionalProperties":false,"description":"Access granted by an organization to a partner application."},"GrantExchange":{"type":"object","properties":{"grantId":{"type":"string","format":"uuid"},"orgId":{"type":"string","format":"uuid"},"orgName":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["orgs:write","nodes:write","members:write","signature:read","signature:write","tasks:read","tasks:write","contacts:read","contacts:write","registered_mail:read","registered_mail:write"]}},"grantedAt":{"type":"string","format":"date-time"}},"required":["grantId","orgId","orgName","scopes","grantedAt"],"additionalProperties":false,"description":"The grant confirmed by an authorization code."},"WebhookEvent":{"type":"object","description":"Envelope of every webhook delivery (version 1).","required":["id","type","apiVersion","createdAt","providerId","orgId","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Event id, identical across retries and replays: deduplicate on it."},"type":{"type":"string","description":"Event type."},"apiVersion":{"type":"string","const":"1","description":"Payload version."},"createdAt":{"type":"string","format":"date-time","description":"When the event occurred."},"providerId":{"type":"string","format":"uuid","description":"Workspace."},"orgId":{"type":["string","null"],"format":"uuid","description":"Organization the event belongs to."},"data":{"type":"object","description":"Event specific data: identifiers and business status. Read the details through the API."}}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"An access token of your workspace identity provider, sent as `Authorization: Bearer <token>`. Get one with the client credentials of an API key or partner application."},"clientCredentials":{"type":"oauth2","description":"API keys and partner applications (provisioning and administration scopes): OAuth 2 `client_credentials`.\n\nEach workspace has its own identity provider: the token URL follows `https://<workspace auth domain>/oauth/v2/token` and is shown with the credentials when you create the API key.\nRequest the scope `openid urn:zitadel:iam:org:project:id:<projectId>:aud` (also shown with the credentials): without the audience scope the API refuses the token (`401 invalid_token`).\nTokens are valid for 10 minutes: cache them and request a new one when `expires_in` is reached.","flows":{"clientCredentials":{"tokenUrl":"http://mylegitech.auth.localhost:8090/oauth/v2/token","scopes":{}}}},"authorizationCode":{"type":"oauth2","description":"Connected apps acting on behalf of a person (delegated OAuth). The identity provider authenticates the person and issues the tokens; MyCLM records the consent and authorizes every call.\n\n1. Send the browser to the MyCLM consent page `<app URL>/oauth/authorize?client_id=…&redirect_uri=…&scope=signature:write contacts:read&state=…&code_challenge=…&code_challenge_method=S256` (PKCE S256 required, `redirect_uri` registered, exact match).\n2. After the consent, the person is sent to the identity provider authorize endpoint with the same `client_id`, `redirect_uri`, `state` and PKCE challenge; with an existing session the code comes back to your `redirect_uri` at once.\n3. Exchange the code at `https://<workspace auth domain>/oauth/v2/token` with a `private_key_jwt` client assertion (RFC 7523, key issued by MyCLM) and the `code_verifier`. Use the refresh token (`offline_access`) to renew the 10 minute access tokens.\n\nBusiness scopes are not carried by the token: a call without (valid) consent answers `403 consent_required` with `details.authorizeUrl`.","flows":{"authorizationCode":{"authorizationUrl":"http://mylegitech.localhost:5173/oauth/authorize","tokenUrl":"http://mylegitech.auth.localhost:8090/oauth/v2/token","refreshUrl":"http://mylegitech.auth.localhost:8090/oauth/v2/token","scopes":{}}}}},"headers":{"RateLimit-Limit":{"description":"Requests allowed per minute for this client (API keys and partner applications).","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"ETag":{"description":"Version of the resource, `W/\"<version>\"`: send it back in `If-Match`.","schema":{"type":"string"}},"Idempotent-Replayed":{"description":"`true` when the response is the recorded response of an earlier request with the same `Idempotency-Key`.","schema":{"type":"string","const":"true"}}}},"x-mlt-error-codes":{"invalid_request":{"status":422,"area":"General","description":"The request does not match the schema. `details.issues` lists each problem (path, message)."},"bad_request":{"status":400,"area":"General","description":"The request body is not valid JSON (it cannot be parsed)."},"payload_too_large":{"status":413,"area":"General","description":"The request body exceeds the size limit."},"already_exists":{"status":409,"area":"General","description":"A resource with the same unique key already exists."},"still_referenced":{"status":409,"area":"General","description":"The resource is still referenced by another resource."},"concurrent_update":{"status":409,"area":"General","description":"Concurrent update of the same resource: retry the request."},"precondition_failed":{"status":412,"area":"General","description":"The resource changed since it was read (`If-Match` / `version` is stale): read it again, then retry."},"idempotency_key_reused":{"status":422,"area":"General","description":"The `Idempotency-Key` was already used (within 24 hours) for a different request: use a new key."},"idempotency_in_progress":{"status":409,"area":"General","description":"A request with the same `Idempotency-Key` is still running: retry a little later."},"idempotency_outcome_unknown":{"status":409,"area":"General","description":"The request with the same `Idempotency-Key` was interrupted and its outcome is unknown (it is never run twice): check the resource, then retry with a new key."},"invalid_reference":{"status":422,"area":"General","description":"A referenced resource does not exist."},"invalid_input":{"status":422,"area":"General","description":"A value has an invalid format or is out of range."},"timeout":{"status":503,"area":"General","description":"The request took too long and was canceled. Retry later."},"forbidden":{"status":403,"area":"General","description":"The caller can see the resource but lacks the permission for this action."},"feature_disabled":{"status":403,"area":"General","description":"The feature (signature, registered mail, tasks) is not enabled for this entity."},"quota_exceeded":{"status":403,"area":"General","description":"The quota of the organization or entity is reached and set to block (see the `options` endpoints)."},"not_found":{"status":404,"area":"General","description":"Unknown route."},"entity_not_found":{"status":404,"area":"General","description":"The entity does not exist or the caller has no access to it."},"invalid_page_token":{"status":422,"area":"General","description":"The `pageToken` is malformed or does not belong to this list."},"invalid_contact":{"status":422,"area":"General","description":"A linked `contactId` is not visible to the caller or does not belong to the resource entity."},"invalid_node_path":{"status":422,"area":"General","description":"Internal node reference is invalid."},"rate_limited":{"status":429,"area":"General","description":"Too many requests for this client in the current minute. Wait `Retry-After` seconds."},"internal_error":{"status":500,"area":"General","description":"Unexpected error. Retry later; contact support with the time of the call if it persists."},"unauthenticated":{"status":401,"area":"Authentication","description":"Missing or malformed `Authorization: Bearer <token>` header."},"invalid_token":{"status":401,"area":"Authentication","description":"The token is invalid, expired, or was requested without the API audience scope."},"unknown_issuer":{"status":401,"area":"Authentication","description":"The token was issued by an identity instance that is not an active workspace."},"api_key_revoked":{"status":401,"area":"Authentication","description":"The API key was revoked."},"api_key_expired":{"status":401,"area":"Authentication","description":"The API key reached its expiry date."},"no_account":{"status":403,"area":"Authentication","description":"The token is valid but its subject has no account (or service account) in this workspace."},"ip_not_allowed":{"status":403,"area":"Authentication","description":"The API key has an IP allowlist and the request comes from another address."},"humans_only":{"status":403,"area":"Authentication","description":"Managing integrations (API keys, webhooks, grants) is reserved to people signed in to the app."},"unknown_client":{"status":401,"area":"Authentication","description":"The token was obtained by an OAuth client that is not a registered MyCLM client (the MyCLM apps, an API key, a partner application)."},"machine_credentials_required":{"status":403,"area":"Partner applications","description":"Provisioning requires the machine credentials (`client_credentials`) of the partner application, not a delegated token."},"partner_app_revoked":{"status":401,"area":"Partner applications","description":"The partner application was revoked."},"insufficient_scope":{"status":403,"area":"Partner applications","description":"The partner application does not have the scope required by this operation."},"consent_required":{"status":403,"area":"Partner applications","description":"The partner application has no access: no active grant on this organization (`details.orgId`), or, with a delegated token, the person has not authorized the application there. Send the person to `details.authorizeUrl` (delegated tokens)."},"partner_app_only":{"status":403,"area":"Partner applications","description":"Reserved to partner applications."},"role_escalation":{"status":403,"area":"Partner applications","description":"The role cannot be given: partner applications cannot grant `owner`, and nobody can grant more rights than their own."},"external_id_required":{"status":422,"area":"Partner applications","description":"An `externalId` is required to look up this resource."},"external_id_taken":{"status":409,"area":"Partner applications","description":"This `externalId` is already used by another resource of the same kind."},"invalid_grant":{"status":422,"area":"Partner applications","description":"The authorization code is invalid, expired, already used, or the `redirectUri` / `codeVerifier` does not match."},"grant_revoked":{"status":409,"area":"Partner applications","description":"The grant behind the authorization code was revoked in the meantime."},"signature_request_not_found":{"status":404,"area":"Signature","description":"The signature request does not exist or the caller cannot see it."},"file_required":{"status":422,"area":"Signature","description":"The multipart `file` part is missing."},"file_too_large":{"status":422,"area":"Signature","description":"The PDF exceeds 15 MB."},"invalid_pdf":{"status":422,"area":"Signature","description":"The file is not a readable PDF."},"signers_required":{"status":422,"area":"Signature","description":"At least one signer is required."},"duplicate_signer_email":{"status":422,"area":"Signature","description":"Two signers have the same email address."},"invalid_expiration":{"status":422,"area":"Signature","description":"The expiry date is invalid."},"expiry_too_long":{"status":422,"area":"Signature","description":"`expiresInDays` is above the maximum allowed by the entity settings."},"vendor_not_allowed":{"status":422,"area":"Signature","description":"The vendor is not allowed by the entity settings (also used by registered mail)."},"vendor_unavailable":{"status":422,"area":"Signature","description":"The vendor is allowed but not configured on the platform."},"vendor_unsupported_level":{"status":422,"area":"Signature","description":"The vendor cannot deliver the requested eIDAS level."},"eidas_level_not_allowed":{"status":422,"area":"Signature","description":"The eIDAS level is not allowed by the entity settings."},"auth_method_not_allowed":{"status":422,"area":"Signature","description":"The signer authentication method is not allowed (or weaker than the required one)."},"signing_order_not_allowed":{"status":422,"area":"Signature","description":"`signingOrder` can only be chosen when the entity lets the sender choose."},"external_signers_not_allowed":{"status":422,"area":"Signature","description":"The entity only allows signers from the organization."},"handwritten_mention_requires_agency":{"status":422,"area":"Signature","description":"A handwritten mention is drawn on site before sending: only for a signer who signs in agency (fields, participants and sending)."},"handwritten_mention_drawing_required":{"status":422,"area":"Signature","description":"A handwritten mention has no drawing yet (`details.fieldIds`, `details.participantIds`): have it drawn before sending."},"document_already_signed":{"status":422,"area":"Signature","description":"The document already carries a digital signature: handwritten mentions cannot be burned into it (`details.documentId`)."},"signature_field_not_found":{"status":404,"area":"Signature","description":"No handwritten mention with this id in the signature request."},"notary_not_allowed":{"status":422,"area":"Signature","description":"Notary participants are disabled by the entity settings."},"signer_phone_required":{"status":422,"area":"Signature","description":"A phone number (E.164) is required for `sms_otp` authentication."},"signature_request_not_cancelable":{"status":409,"area":"Signature","description":"Only requests waiting for signatures can be canceled."},"signature_request_completed":{"status":409,"area":"Signature","description":"The request is already completed."},"signature_request_declined":{"status":409,"area":"Signature","description":"The request was declined by a signer."},"signature_request_canceled":{"status":409,"area":"Signature","description":"The request was canceled."},"signature_request_expired":{"status":409,"area":"Signature","description":"The request expired."},"signature_request_not_completed":{"status":409,"area":"Signature","description":"The signed document exists only once the request is completed."},"signed_document_not_available":{"status":409,"area":"Signature","description":"The signed document is not available yet."},"document_purged":{"status":409,"area":"Signature","description":"The document was deleted by the retention policy (metadata and proof are kept)."},"document_archived":{"status":409,"area":"Signature","description":"The document was archived by the retention policy."},"signature_vendor_missing":{"status":409,"area":"Signature","description":"The vendor of this request is no longer configured."},"registered_mail_not_found":{"status":404,"area":"Registered mail","description":"The registered mail does not exist or the caller cannot see it."},"registered_mail_item_not_found":{"status":404,"area":"Registered mail","description":"Unknown item for this registered mail."},"registered_mail_attachment_not_found":{"status":404,"area":"Registered mail","description":"Unknown attachment for this registered mail."},"registered_mail_proof_not_found":{"status":404,"area":"Registered mail","description":"This proof is not available (yet) for the item."},"recipient_update_not_found":{"status":404,"area":"Registered mail","description":"Unknown recipient email change request."},"sender_account_not_found":{"status":404,"area":"Registered mail","description":"The sender account does not exist or the caller cannot see it."},"subject_required":{"status":422,"area":"Registered mail","description":"The subject is required."},"subject_too_long":{"status":422,"area":"Registered mail","description":"The subject is too long for the vendor."},"recipients_required":{"status":422,"area":"Registered mail","description":"At least one recipient is required to send."},"too_many_recipients":{"status":422,"area":"Registered mail","description":"Too many recipients (max 50)."},"too_many_followers":{"status":422,"area":"Registered mail","description":"Too many followers (max 20)."},"duplicate_recipient_email":{"status":422,"area":"Registered mail","description":"Two recipients have the same email address."},"invalid_recipient":{"status":422,"area":"Registered mail","description":"A recipient is incomplete."},"recipient_company_required":{"status":422,"area":"Registered mail","description":"Professional recipients need a company name."},"sender_account_required":{"status":422,"area":"Registered mail","description":"A verified sender account is required to send."},"invalid_sender_account":{"status":422,"area":"Registered mail","description":"The sender account does not belong to this entity."},"sender_account_not_verified":{"status":422,"area":"Registered mail","description":"The sender account is not verified at the vendor yet."},"sender_account_not_linked":{"status":422,"area":"Registered mail","description":"The sender account is not linked to a vendor account."},"sender_account_vendor_mismatch":{"status":422,"area":"Registered mail","description":"The sender account belongs to another vendor."},"sender_company_required":{"status":422,"area":"Registered mail","description":"Professional sender accounts need a company name."},"sender_label_required":{"status":422,"area":"Registered mail","description":"The sender account label is required."},"reference_required":{"status":422,"area":"Registered mail","description":"The entity requires a `reference` on every registered mail."},"type_not_allowed":{"status":422,"area":"Registered mail","description":"The registered mail type is not allowed by the entity settings."},"attachments_limit_exceeded":{"status":422,"area":"Registered mail","description":"Too many attachments, or total size above the entity limit."},"registered_mail_already_sent":{"status":409,"area":"Registered mail","description":"The mail was already sent with another idempotency key, or is no longer a draft."},"registered_mail_canceled":{"status":409,"area":"Registered mail","description":"The registered mail was canceled."},"registered_mail_not_cancelable":{"status":409,"area":"Registered mail","description":"Only drafts can be canceled."},"registered_mail_item_not_retryable":{"status":409,"area":"Registered mail","description":"Only items that failed before the vendor accepted them can be retried."},"registered_mail_item_not_submitted":{"status":409,"area":"Registered mail","description":"The item was not submitted to the vendor."},"recipient_update_already_answered":{"status":409,"area":"Registered mail","description":"The recipient email change request was already answered."},"sender_account_exists":{"status":409,"area":"Registered mail","description":"A sender account with this email already exists for the entity."},"vendor_error":{"status":409,"area":"Registered mail","description":"The registered mail vendor refused the operation or is unreachable. `message` carries the vendor reason."},"contact_not_found":{"status":404,"area":"Contacts","description":"The contact does not exist or the caller cannot see it."},"contact_name_required":{"status":422,"area":"Contacts","description":"A person needs a first name or a last name."},"company_name_required":{"status":422,"area":"Contacts","description":"A company needs a name."},"company_link_person_only":{"status":422,"area":"Contacts","description":"Only persons can be linked to a company."},"invalid_company":{"status":422,"area":"Contacts","description":"`companyId` is not a visible company contact of the same entity."},"invalid_phone":{"status":422,"area":"Contacts","description":"`phone` is not a valid phone number."},"invalid_mobile_phone":{"status":422,"area":"Contacts","description":"`mobilePhone` is not a valid phone number."},"invalid_siren":{"status":422,"area":"Contacts","description":"Invalid SIREN (9 digits, Luhn checksum)."},"invalid_siret":{"status":422,"area":"Contacts","description":"Invalid SIRET (14 digits, Luhn checksum)."},"siren_siret_mismatch":{"status":422,"area":"Contacts","description":"The SIRET does not start with the SIREN."},"private_owner_only":{"status":403,"area":"Contacts","description":"Only the creator of a contact can change its visibility (`isPrivate`)."},"merge_same_contact":{"status":422,"area":"Contacts","description":"A contact cannot be merged into itself."},"merge_kind_mismatch":{"status":422,"area":"Contacts","description":"Only contacts of the same kind can be merged."},"import_file_required":{"status":422,"area":"Contacts","description":"The multipart `file` part is missing."},"import_too_large":{"status":422,"area":"Contacts","description":"The CSV exceeds 5 MB or 5,000 rows."},"import_empty":{"status":422,"area":"Contacts","description":"The CSV has no data row."},"import_unknown_column":{"status":422,"area":"Contacts","description":"The mapping refers to a column that is not in the CSV header."},"task_not_found":{"status":404,"area":"Tasks","description":"The task does not exist or the caller cannot see it."},"invalid_assignee":{"status":422,"area":"Tasks","description":"The assignee cannot use tasks in this entity."},"invalid_occurrence":{"status":422,"area":"Tasks","description":"`occurrenceAt` is not an occurrence of the task."},"invalid_recurrence":{"status":422,"area":"Tasks","description":"The recurrence is invalid."},"invalid_timezone":{"status":422,"area":"Tasks","description":"Unknown IANA time zone."},"organization_not_found":{"status":404,"area":"Structure & members","description":"The organization does not exist or the caller has no access to it."},"node_not_found":{"status":404,"area":"Structure & members","description":"The node does not exist or the caller cannot see it."},"membership_not_found":{"status":404,"area":"Structure & members","description":"The membership does not exist or the caller cannot see it."},"role_not_found":{"status":404,"area":"Structure & members","description":"The role does not exist in this organization."},"user_not_found":{"status":404,"area":"Structure & members","description":"Unknown user."},"invalid_node_name":{"status":422,"area":"Structure & members","description":"Invalid node name."},"invalid_parent":{"status":422,"area":"Structure & members","description":"Entities go under the organization, groups under an entity or a group."},"max_depth_reached":{"status":422,"area":"Structure & members","description":"The organization tree is too deep."},"role_other_org":{"status":422,"area":"Structure & members","description":"The role belongs to another organization."},"membership_move_other_entity":{"status":422,"area":"Structure & members","description":"A membership can only move inside its entity."},"cannot_delete_organization":{"status":403,"area":"Structure & members","description":"The organization node itself cannot be deleted."},"node_not_empty":{"status":409,"area":"Structure & members","description":"The node still has children or members."},"already_member":{"status":409,"area":"Structure & members","description":"The user already has a membership in this entity."},"last_owner":{"status":409,"area":"Structure & members","description":"The last owner of an organization cannot be removed or demoted."},"service_account":{"status":409,"area":"Structure & members","description":"Service accounts (API keys) cannot be invited or provisioned as members."}},"x-mlt-permissions":["org.manage","nodes.manage","organizations.manage","members.read","members.manage","roles.manage","features.manage","integrations.manage","quotas.manage","tasks.use","tasks.read_all","signature.read","signature.send","signature.manage","registered_mail.read","registered_mail.send","registered_mail.manage","contacts.read","contacts.write","contacts.manage","resources.manage","resources.distribute","resources.use","drive.read","drive.write","drive.manage","drive.org_manage","ai.use","ai.manage","test_mode.access"],"x-mlt-partner-scopes":{"orgs:write":["org.manage"],"nodes:write":["nodes.manage"],"members:write":["members.read","members.manage"],"signature:read":["signature.read"],"signature:write":["signature.read","signature.send","signature.manage"],"tasks:read":["tasks.use"],"tasks:write":["tasks.use","tasks.read_all"],"contacts:read":["contacts.read"],"contacts:write":["contacts.read","contacts.write","contacts.manage"],"registered_mail:read":["registered_mail.read"],"registered_mail:write":["registered_mail.read","registered_mail.send","registered_mail.manage"]}}