Creates a pending invitation in the organization and environment selected by the authenticated service user and required headers.
The response contains the only current plaintext code. DeepCredentials does not email the code or return a redemption URL in the B2B flow. Your system owns code delivery and the recipient experience. Exchange the recipient's email and code through POST /api/v1/public/credential-invitations/redeem; where and how your system exposes that flow is up to you.
Only one pending invitation may exist for the same organization, environment, credential definition, and normalized email address. reference_id is correlation metadata only; it does not make this operation idempotent or unique.
Credential definition to issue after redemption. Configure it in the portal before making runtime B2B calls.
Recipient email used together with the code by the public redemption endpoint. It is trimmed and normalized to lowercase when stored. DeepCredentials does not email it in this B2B flow.
Claim values for the eventual credential. Keys and JSON value types must match the credential definition, all mandatory claims must be present, and the serialized payload must not exceed 6 MB. Invitation responses do not return these values; retain them in your own durable request record when lost-response recovery matters.
Positive lifetime of the invitation code in seconds.
Optional positive lifetime, in seconds, of the credential offer created after redemption.
Optional eventual credential lifetime in seconds. Omit to use the credential definition default. Allowed range is 60 seconds through 10 years. Invitation responses do not return this value; retain it in your own durable request record when lost-response recovery matters.
- Mock serverhttps://docs.deepcredentials.swiss/_mock/docs/openapi/credential-invitations-v1/b2b/v1/credential-invitations
- Developmenthttps://api.dev.deepcredentials.swiss/b2b/v1/credential-invitations
- Integrationhttps://api.int.deepcredentials.swiss/b2b/v1/credential-invitations
curl -i -X POST \
https://docs.deepcredentials.swiss/_mock/docs/openapi/credential-invitations-v1/b2b/v1/credential-invitations \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-H 'X-Environment: beta' \
-H 'X-Org-Id: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \
-d '{
"credential_definition_id": "db167a9d-8182-430c-bff0-f9baa6d48bb6",
"email": "alice@example.com",
"claims": {
"given_name": "Alice",
"employee_number": "E-1042"
},
"reference_id": "partner-invitation-1042",
"invitation_ttl_seconds": 86400,
"offer_validity_seconds": 600,
"validity_seconds": 31536000
}'Invitation created. The caller owns delivery of the returned code.
Environment selected by X-Environment when the invitation was created.
Credential definition name captured when the invitation was created.
Last four normalized code characters for support and delivery confirmation. This is not a redeemable code.
Current invitation lifecycle state.
Configured lifetime of the offer created after redemption, when supplied at creation.
Offer created by a successful redemption. Present only after redemption.
{ "invitation_id": "305ac8b8-299a-4e63-a969-405840e67772", "environment": "beta", "credential_definition_id": "db167a9d-8182-430c-bff0-f9baa6d48bb6", "credential_definition_name": "Employee Card", "email": "alice@example.com", "code_last4": "X7Q9", "status": "pending", "reference_id": "partner-invitation-1042", "offer_validity_seconds": 600, "expires_at": "2026-08-19T10:00:00Z", "created_at": "2026-08-18T10:00:00Z", "code": "7KMTD-5X7Q9" }