Docs
llms.txt for AI agents Download OpenAPI spec

Organizations and Acting-As

An organization lets one partner (the organization admin) call the Crebit Lock API on behalf of other partners (its members) with a single set of API keys. Every request still runs as the member, so quotes, contracts, orders, limits and webhooks stay separate per member. If you want to follow your members' events too, you can receive their webhooks on your own endpoint.

  • Crebit creates the organization and assigns its admin. Contact your Crebit representative to enable it.
  • The admin then discovers, creates, removes and re-adds members, and manages their API keys, through the API or the partner portal.
  • A partner can administer only one organization. A partner can be a member of several organizations, and each of their admins can act as it.
  • A partner that administers an active organization can't also be a member of another one, and can't be acted as.
  • Every acting-as request is audited with both the admin (caller) and the member (subject).

Choose a Product

This page covers the organization itself and the member lifecycle. For the end-to-end calls you make for a member, pick a product:

  • Fiat: member fiat readiness, payout bank accounts, limits, then Spot and Deliverable Forward end to end, and how to add your own client spread to a member's trade.
  • Crypto: the manual rate-lock flow (quotes, contracts, funding, settlement, margin calls and webhooks), and how to add a client spread on a member's rate lock.
  • KYB via API: submit a member's business verification.

What It Is Not

  • Not key sharing.You don't use a member's API keys. You call with your own keys and name the member in a header. One known exception: inbound crypto webhooks for a member must currently be signed with the member's webhook signing secret in production (see Crypto: Fund the contract).
  • Not dashboard sharing.Your partner portal shows your own book. You don't see a member's dashboard, and it doesn't see yours.
  • Not self-serve.You can't create an organization or make yourself an admin. Crebit creates the organization and assigns its admin.
  • Not the on_behalf_of_partner_id field. That optional field on quote and contract create is a label for your own records. The quote or contract still belongs to the partner whose keys made the call, and the field grants no access to the partner it names.
  • Removing a member doesn't delete it. The member keeps its partner account, users, keys and orders (see Remove a member).

Acting-as Header

Send your normal partner authentication headers plus one extra header with the member's partner id:

HeaderValue
X-Crebit-Key-IdOrganization admin key id
X-Crebit-Key-SecretOrganization admin key secret
X-Crebit-Environmentsandbox or production (must match the key and host)
X-Crebit-Acting-As-Partner-IdMember partner UUID
  • Accepted on the partner crypto endpoints (/api/v1/fx/…: quotes, contracts, webhooks, customer references, supported chains) and the fiat endpoints (/api/v1/fiat/…).
  • Required on the KYB via API endpoints.
  • Not used on member management and discovery (/api/v1/partners/organisation/…, /api/v1/partners/acting-as-partners): those always act on your own organization.
  • Omit the header to call as yourself. The header is checked on every request: once a member is removed, acting as it fails immediately with 403 acting_as_not_allowed.
  • Acting-as is also refused with 403 acting_as_not_allowed when your organization is not active (for example, deactivated by Crebit), or when the member itself administers an active organization.

Discover Members

List the partners you can act as right now (active members of the organization you administer). Uses your own keys, no acting-as header. Returns an empty list if you don't administer an organization.

HTTP code sample
curl -sS -X GET "https://lock-apis-sandbox.crebitpay.com/api/v1/partners/acting-as-partners" \
  -H "X-Crebit-Key-Id: ADMIN_KEY_ID" \
  -H "X-Crebit-Key-Secret: ADMIN_KEY_SECRET" \
  -H "X-Crebit-Environment: sandbox"
json, response code sample
json, response
{
  "items": [
    {
      "id": "8f3c2a1e-4b5d-4e6f-9a7b-1c2d3e4f5a6b",
      "name": "Member Co",
      "organisation_id": "2b7e9d4c-1a3f-4c5e-8d6b-7a9f0e1d2c3b",
      "organisation_name": "Platform Co"
    }
  ]
}

Call as a Member

Add X-Crebit-Acting-As-Partner-Id to any supported request. For example, create a crypto rate-lock quote for the member:

HTTP code sample
curl -sS -X POST "https://lock-apis-sandbox.crebitpay.com/api/v1/fx/quotes" \
  -H "Content-Type: application/json" \
  -H "X-Crebit-Key-Id: ADMIN_KEY_ID" \
  -H "X-Crebit-Key-Secret: ADMIN_KEY_SECRET" \
  -H "X-Crebit-Environment: sandbox" \
  -H "X-Crebit-Acting-As-Partner-Id: 8f3c2a1e-4b5d-4e6f-9a7b-1c2d3e4f5a6b" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"customer_reference_id":"partner-cust-ref-2026-0042","customer_name":"Acme Imports Pvt Ltd","contract_type":"forward","direction":"USD_TO_BRL","notional_currency":"USD","notional_amount":"50000.00","provider_rate":"5.42","market_rate":"5.4180","market_rate_timestamp":"2026-05-24T16:00:00Z","provider_extra_spread":"0.0005","strike_mode":"cip_fair","window_start":"2026-08-04T00:00:00Z","window_end":"2026-08-11T00:00:00Z","chain":"solana","settlement_currency":"USDC","payout_wallet_address":"EndUserSolanaWalletForSettlement","oracle":"redstone"}'
json, response code sample
json, response
{
  "id": "22222222-2222-4222-8222-222222222222",
  "status": "created",
  "locked_rate": "5.42",
  "strike_mode": "cip_fair",
  "target_strike": null,
  "strike_advantage_bps": 12,
  "provider_extra_spread": "0.0005",
  "premium_amount": "1565.00",
  "deposit_amount": "5000.00",
  "total_amount": "6565.00",
  "amount_due": "6565.00",
  "collateral_amount": "5000.00",
  "upfront_fee": "565.00",
  "pricing_tier": "ml_full",
  "pricing_greeks": {
    "delta": "0.42",
    "gamma": "0.01"
  },
  "window_start": "2026-08-04T00:00:00Z",
  "window_end": "2026-08-11T00:00:00Z",
  "chain": "solana",
  "settlement_currency": "USDC",
  "payout_wallet_address": "EndUserSolanaWalletForSettlement",
  "oracle": "redstone",
  "expires_at": "2026-05-24T16:30:00Z",
  "created_at": "2026-05-24T16:15:00Z"
}

The response is the same as a quote the member created with its own keys, and the quote belongs to the member. Send the same header when you create the contract and read it back. The full flows are on the Fiat and Crypto pages.

Member Lifecycle

Member management uses the organization admin's own keys and never takes the acting-as header. The caller must be the admin of an active organization, otherwise every call returns 403 not_organisation_admin.

MethodPathPurpose
GET/api/v1/partners/organisationYour organization and its settings (member_webhooks_enabled)
PATCH/api/v1/partners/organisationTurn member webhooks on or off
GET/api/v1/partners/organisation/membersYour organization with its active members
POST/api/v1/partners/organisation/membersCreate (provision) a new member partner. Credentials are returned once. Production host only.
DELETE/api/v1/partners/organisation/members/{partner_id}Remove a member (soft delete of the membership)
POST/api/v1/partners/organisation/members/attachRe-add a partner that was previously a member of your organization
GET/api/v1/partners/organisation/members/{partner_id}/api-keysList a member's API keys
POST/api/v1/partners/organisation/members/{partner_id}/api-keysCreate an API key for a member (secret returned once)
POST/api/v1/partners/organisation/members/{partner_id}/api-keys/rotateReplace a member's active key, with a grace period for the old one
POST/api/v1/partners/organisation/members/{partner_id}/api-keys/{key_id}/revokeRevoke one of a member's keys

List Members

Returns the organization with its active memberships. The list includes your own membership (role: "admin") first, then members (role: "member") by name. Removed members are not listed.

  • added_via says who added the membership: admin (Crebit), portal (you, in the partner portal; created_by_partner_user_id is the portal user) or api (you, with API keys).
  • created_at is when the partner last joined: re-adding a removed member resets it.
  • kyb_statusis the member company's KYB status (not_started, draft, invite_sent, under_review, needs_info, approved, rejected). Crebit sets the review outcome; you are told about every change with the member KYB status webhook.
  • peer_sync_pending and peer_sync_error are only meaningful on remove and re-add responses (see Environments); on reads they are always false and null.
HTTP code sample
curl -sS -X GET "https://lock-apis-sandbox.crebitpay.com/api/v1/partners/organisation/members" \
  -H "X-Crebit-Key-Id: ADMIN_KEY_ID" \
  -H "X-Crebit-Key-Secret: ADMIN_KEY_SECRET" \
  -H "X-Crebit-Environment: sandbox"
json, response code sample
json, response
{
  "id": "2b7e9d4c-1a3f-4c5e-8d6b-7a9f0e1d2c3b",
  "name": "Platform Co",
  "admin_partner_id": "4c1d2e3f-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
  "admin_partner_name": "Platform Co",
  "status": "active",
  "notes": null,
  "created_at": "2026-09-01T10:00:00Z",
  "members": [
    {
      "id": "0d1e2f30-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
      "partner_id": "4c1d2e3f-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
      "partner_name": "Platform Co",
      "role": "admin",
      "deleted_at": null,
      "created_at": "2026-09-01T10:00:00Z",
      "created_by_admin_user_id": "7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d",
      "created_by_partner_id": null,
      "created_by_partner_user_id": null,
      "added_via": "admin",
      "peer_sync_pending": false,
      "peer_sync_error": null
    },
    {
      "id": "1e2f3a4b-5c6d-4e7f-8a9b-0c1d2e3f4a5b",
      "partner_id": "8f3c2a1e-4b5d-4e6f-9a7b-1c2d3e4f5a6b",
      "partner_name": "Member Co",
      "role": "member",
      "deleted_at": null,
      "created_at": "2026-09-20T09:30:00Z",
      "created_by_admin_user_id": null,
      "created_by_partner_id": "4c1d2e3f-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
      "created_by_partner_user_id": null,
      "added_via": "api",
      "kyb_status": "under_review",
      "peer_sync_pending": false,
      "peer_sync_error": null
    }
  ],
  "peer_sync_pending": false,
  "peer_sync_error": null
}

Create a Member

Creates the member partner, its super admin portal user and its API keys, then adds it to your organization. Available on the production host only; on the sandbox host it returns 403 forbidden ("Partner onboarding is not available on the partner-sandbox Lock API host").

FieldTypeNotes
namestring, requiredDisplay name, 1 to 256 characters
legal_namestring, optionalUp to 256 characters
super_admin_emailstring, requiredLogin email for the member's portal super admin. Must not already be registered (409 conflict).
super_admin_namestring, required1 to 256 characters
super_admin_passwordstring, optional8 to 256 characters with upper case, lower case, a number and a special character. Generated when omitted.

Unknown fields are rejected.

HTTP code sample
curl -sS -X POST "https://lock-apis.crebitpay.com/api/v1/partners/organisation/members" \
  -H "Content-Type: application/json" \
  -H "X-Crebit-Key-Id: ADMIN_KEY_ID" \
  -H "X-Crebit-Key-Secret: ADMIN_KEY_SECRET" \
  -H "X-Crebit-Environment: production" \
  -d '{"name":"Member Co","legal_name":"Member Co Ltda","super_admin_email":"ops@member.example","super_admin_name":"Ana Member"}'
json, response (201) code sample
json, response (201)
{
  "organisation_id": "2b7e9d4c-1a3f-4c5e-8d6b-7a9f0e1d2c3b",
  "partner_id": "8f3c2a1e-4b5d-4e6f-9a7b-1c2d3e4f5a6b",
  "partner_user_id": "5d6e7f80-9a1b-4c2d-8e3f-4a5b6c7d8e9f",
  "partner_name": "Member Co",
  "role": "member",
  "super_admin_email": "ops@member.example",
  "super_admin_name": "Ana Member",
  "super_admin_password": "Generated-Once-9f!",
  "api_keys": {
    "production": {
      "api_key_id": "0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
      "public_key_id": "cbk_prd_…",
      "secret": "cbs_… (shown once)",
      "environment": "production"
    },
    "sandbox": {
      "api_key_id": "1b2c3d4e-5f6a-4b7c-9d8e-0f1a2b3c4d5e",
      "public_key_id": "cbk_sbx_…",
      "secret": "cbs_… (shown once)",
      "environment": "sandbox"
    }
  },
  "access_scope": "production_and_sandbox",
  "peer_finalize_pending": false,
  "peer_finalize_error": null
}
  • api_keys holds a production and a sandbox key (access_scope: "production_and_sandbox"). Each key has api_key_id, public_key_id, secret and environment. These are the member's own keys, for the member to call Crebit directly; you keep using your own keys with the acting-as header. The api_key_id is the id you pass when you manage the member's keys later.
  • The new member is mirrored to sandbox automatically, so you can act as it on both hosts with the same member partner id.
  • If peer_finalize_pending is true, the member, its production key and its production membership were created, but the sandbox copy (sandbox key or sandbox membership) is not finished yet (peer_finalize_error says why). The response still returns the production secrets and the member can be acted as in production; contact Crebit to finish the sandbox setup.
The super admin password and API key secrets are returned once. Store them securely and share them with the member through a secure channel; Crebit only keeps hashes.

Remove a Member

Removing a member is a soft delete of the membership only. The response is the membership with deleted_at set. Removing a member that is already removed returns the same membership again (no error).

HTTP code sample
curl -sS -X DELETE "https://lock-apis.crebitpay.com/api/v1/partners/organisation/members/6e7f8091-a2b3-4c4d-9e5f-6a7b8c9d0e1f" \
  -H "X-Crebit-Key-Id: ADMIN_KEY_ID" \
  -H "X-Crebit-Key-Secret: ADMIN_KEY_SECRET" \
  -H "X-Crebit-Environment: production"
json, response code sample
json, response
{
  "id": "2f3a4b5c-6d7e-4f8a-9b0c-1d2e3f4a5b6c",
  "partner_id": "6e7f8091-a2b3-4c4d-9e5f-6a7b8c9d0e1f",
  "partner_name": "Former Member Co",
  "role": "member",
  "deleted_at": "2026-09-28T12:00:00Z",
  "created_at": "2026-09-10T08:00:00Z",
  "created_by_admin_user_id": null,
  "created_by_partner_id": "4c1d2e3f-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
  "created_by_partner_user_id": "3a4b5c6d-7e8f-4a9b-8c0d-1e2f3a4b5c6d",
  "added_via": "portal",
  "peer_sync_pending": false,
  "peer_sync_error": null
}
  • The membership ends immediately. The partner drops out of discovery and the members list.
  • The partner's account, portal users, API keys, quotes, contracts and orders stay as they are. It can keep using Crebit with its own keys and still sees its history in its own partner portal.
  • Any further acting-as request for that partner returns 403 acting_as_not_allowed:
json, response (403) code sample
json, response (403)
{
  "code": "acting_as_not_allowed",
  "message": "Subject is not an active member of the caller's organisation",
  "details": {
    "caller_partner_id": "4c1d2e3f-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
    "subject_partner_id": "6e7f8091-a2b3-4c4d-9e5f-6a7b8c9d0e1f",
    "organisation_id": "2b7e9d4c-1a3f-4c5e-8d6b-7a9f0e1d2c3b"
  }
}

You cannot remove the organization admin (400 organisation_cannot_remove_admin). A partner that was never in your organization returns 404 not_found.

Re-Add a Member

Re-attach a partner that was previously a member of your organization, including partners you created. This reactivates the existing membership, sets created_at to the time of the re-add and added_via to how it was re-added. Attaching any other existing partner returns 403 organisation_attach_not_allowed; ask Crebit to add it.

HTTP code sample
curl -sS -X POST "https://lock-apis.crebitpay.com/api/v1/partners/organisation/members/attach" \
  -H "Content-Type: application/json" \
  -H "X-Crebit-Key-Id: ADMIN_KEY_ID" \
  -H "X-Crebit-Key-Secret: ADMIN_KEY_SECRET" \
  -H "X-Crebit-Environment: production" \
  -d '{"partner_id":"6e7f8091-a2b3-4c4d-9e5f-6a7b8c9d0e1f"}'
json, response (201) code sample
json, response (201)
{
  "id": "2f3a4b5c-6d7e-4f8a-9b0c-1d2e3f4a5b6c",
  "partner_id": "6e7f8091-a2b3-4c4d-9e5f-6a7b8c9d0e1f",
  "partner_name": "Former Member Co",
  "role": "member",
  "deleted_at": null,
  "created_at": "2026-09-28T15:30:00Z",
  "created_by_admin_user_id": null,
  "created_by_partner_id": "4c1d2e3f-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
  "created_by_partner_user_id": null,
  "added_via": "api",
  "peer_sync_pending": false,
  "peer_sync_error": null
}

The partner must still be active (400 partner_not_active) and not already an active member (409 organisation_member_exists). A partner that administers an active organization of its own can't be a member of yours:

json, response (409) code sample
json, response (409)
{
  "code": "organisation_member_is_org_admin",
  "message": "This partner administers its own organisation and cannot be a member of another organisation",
  "details": {
    "partner_id": "7d8e9f0a-1b2c-4d3e-9f4a-5b6c7d8e9f0a",
    "admin_of_organisation_id": "9c8b7a6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"
  }
}

Manage a Member's API Keys

List, create, rotate and revoke the API keys of a member, for example when the member lost the keys returned when you created it or a secret leaked. You call with your own keys and the member's partner id in the path; no acting-as header.

  • The member must be an active member of the active organization you administer. Removed members return 403 organisation_member_not_active.
  • You can't manage your own keys here (400 organisation_cannot_manage_admin); use your partner portal.
  • Keys are per host. Manage production keys on https://lock-apis.crebitpay.com with your production key, and sandbox keys on https://lock-apis-sandbox.crebitpay.com with your sandbox key. The environment in the body must match your X-Crebit-Environment (400 bad_request), the same rule the partner portal applies. Members you create on production are mirrored to sandbox, so the same partner id works on both hosts.
  • A member has at most one active key per environment. To replace it, rotate (or revoke, then create).
  • Every change is written to the member's audit log with you as the actor, so the member sees it in its own partner portal.

List Keys

Returns the member's keys for your environment, newest first, including revoked ones. Secrets are never returned.

HTTP code sample
curl -sS -X GET "https://lock-apis.crebitpay.com/api/v1/partners/organisation/members/8f3c2a1e-4b5d-4e6f-9a7b-1c2d3e4f5a6b/api-keys" \
  -H "X-Crebit-Key-Id: ADMIN_KEY_ID" \
  -H "X-Crebit-Key-Secret: ADMIN_KEY_SECRET" \
  -H "X-Crebit-Environment: production"
json, response code sample
json, response
{
  "partner_id": "8f3c2a1e-4b5d-4e6f-9a7b-1c2d3e4f5a6b",
  "environment": "production",
  "items": [
    {
      "id": "3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f",
      "public_key_id": "cbk_prd_Q8mZ2rT5vX9bN4kL7pW1sD6fH3jA0cE",
      "key_prefix": "cbk_prd_Q8mZ2rT5vX9bN4kL7pW1sD6f",
      "environment": "production",
      "status": "active",
      "revoked_at": null,
      "created_at": "2026-09-20T09:30:02Z"
    }
  ]
}

Create a Key

FieldTypeNotes
environmentstring, requiredsandbox or production; must match X-Crebit-Environment
HTTP code sample
curl -sS -X POST "https://lock-apis.crebitpay.com/api/v1/partners/organisation/members/8f3c2a1e-4b5d-4e6f-9a7b-1c2d3e4f5a6b/api-keys" \
  -H "Content-Type: application/json" \
  -H "X-Crebit-Key-Id: ADMIN_KEY_ID" \
  -H "X-Crebit-Key-Secret: ADMIN_KEY_SECRET" \
  -H "X-Crebit-Environment: production" \
  -d '{"environment":"production"}'
json, response (201) code sample
json, response (201)
{
  "id": "3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f",
  "partner_id": "8f3c2a1e-4b5d-4e6f-9a7b-1c2d3e4f5a6b",
  "environment": "production",
  "public_key_id": "cbk_prd_Q8mZ2rT5vX9bN4kL7pW1sD6fH3jA0cE",
  "secret": "cbs_… (shown once)",
  "created_at": "2026-09-20T09:30:02Z"
}

If the member already has an active key for that environment:

json, response (409) code sample
json, response (409)
{
  "code": "active_api_key_exists",
  "message": "Only one active production API key is allowed at a time. Rotate or revoke the existing key before creating a new one.",
  "details": {
    "partner_id": "8f3c2a1e-4b5d-4e6f-9a7b-1c2d3e4f5a6b",
    "environment": "production"
  }
}

Rotate a Key

Revokes the member's active key and creates a new one. The old secret keeps working for overlap_minutes so the member can switch without downtime. If the member has no active key, rotate just creates one.

FieldTypeNotes
environmentstring, requiredsandbox or production; must match X-Crebit-Environment
overlap_minutesinteger, optional0 to 1440. Minutes the old secret stays valid. 0 or omitted uses the Crebit default.
HTTP code sample
curl -sS -X POST "https://lock-apis.crebitpay.com/api/v1/partners/organisation/members/8f3c2a1e-4b5d-4e6f-9a7b-1c2d3e4f5a6b/api-keys/rotate" \
  -H "Content-Type: application/json" \
  -H "X-Crebit-Key-Id: ADMIN_KEY_ID" \
  -H "X-Crebit-Key-Secret: ADMIN_KEY_SECRET" \
  -H "X-Crebit-Environment: production" \
  -d '{"environment":"production","overlap_minutes":60}'
json, response code sample
json, response
{
  "id": "4d5e6f7a-8b9c-4d0e-9f1a-2b3c4d5e6f7a",
  "partner_id": "8f3c2a1e-4b5d-4e6f-9a7b-1c2d3e4f5a6b",
  "environment": "production",
  "public_key_id": "cbk_prd_Z1yX2wV3uT4sR5qP6oN7mL8kJ9iH0gF",
  "secret": "cbs_… (shown once)",
  "created_at": "2026-09-29T14:00:00Z"
}

Revoke a Key

Revokes the key immediately, with no grace period. Revoking a key that is already revoked returns it again (no error). A key that doesn't belong to the member, or belongs to the other environment, returns 404 not_found.

HTTP code sample
curl -sS -X POST "https://lock-apis.crebitpay.com/api/v1/partners/organisation/members/8f3c2a1e-4b5d-4e6f-9a7b-1c2d3e4f5a6b/api-keys/3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f/revoke" \
  -H "X-Crebit-Key-Id: ADMIN_KEY_ID" \
  -H "X-Crebit-Key-Secret: ADMIN_KEY_SECRET" \
  -H "X-Crebit-Environment: production"
json, response code sample
json, response
{
  "id": "3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f",
  "public_key_id": "cbk_prd_Q8mZ2rT5vX9bN4kL7pW1sD6fH3jA0cE",
  "key_prefix": "cbk_prd_Q8mZ2rT5vX9bN4kL7pW1sD6f",
  "environment": "production",
  "status": "revoked",
  "revoked_at": "2026-09-29T14:05:00Z",
  "created_at": "2026-09-20T09:30:02Z"
}

For a partner that is not (or no longer) an active member of your organization, all four calls return:

json, response (403) code sample
json, response (403)
{
  "code": "organisation_member_not_active",
  "message": "Partner is not an active member of your organisation",
  "details": {
    "partner_id": "6e7f8091-a2b3-4c4d-9e5f-6a7b8c9d0e1f",
    "organisation_id": "2b7e9d4c-1a3f-4c5e-8d6b-7a9f0e1d2c3b"
  }
}
Secrets are returned once, on create and rotate. Share them with the member through a secure channel; Crebit only keeps hashes.

Receiving Webhooks for Member Partners

If you onboard merchants as member partners, you can receive their webhooks on your own endpoint, next to your own events. Every payload tells you clearly whether the event is yours or which member it belongs to.

  • Off by default. Turn it on once per organization.
  • Nothing changes for the member. A member still receives its own events only if it has its own webhook endpoint; you get a separate copy.
  • One endpoint.Copies go to the webhook endpoint configured on your own (admin) partner account, signed with your signing secret. You don't need the member's endpoint or secret.
  • KYB updates are always on. The member KYB status event is sent to you whether or not member webhooks are enabled.

Enable Member Webhooks

Choose one of:

  • API: PATCH /api/v1/partners/organisation with your own admin API key and no acting-as header.
  • Partner portal: the Organization page, Member webhooks toggle.
  • Crebit: ask your Crebit representative to turn it on for you.

Read the current setting with GET:

HTTP code sample
curl -sS -X GET "https://lock-apis-sandbox.crebitpay.com/api/v1/partners/organisation" \
  -H "X-Crebit-Key-Id: ADMIN_KEY_ID" \
  -H "X-Crebit-Key-Secret: ADMIN_KEY_SECRET" \
  -H "X-Crebit-Environment: sandbox"
json, response code sample
json, response
{
  "id": "2b7e9d4c-1a3f-4c5e-8d6b-7a9f0e1d2c3b",
  "name": "Platform Co",
  "status": "active",
  "member_webhooks_enabled": false
}

Turn it on:

FieldTypeNotes
member_webhooks_enabledboolean, requiredtrue to receive copies of your members' events, false to stop
HTTP code sample
curl -sS -X PATCH "https://lock-apis-sandbox.crebitpay.com/api/v1/partners/organisation" \
  -H "Content-Type: application/json" \
  -H "X-Crebit-Key-Id: ADMIN_KEY_ID" \
  -H "X-Crebit-Key-Secret: ADMIN_KEY_SECRET" \
  -H "X-Crebit-Environment: sandbox" \
  -d '{"member_webhooks_enabled":true}'
json, response code sample
json, response
{
  "id": "2b7e9d4c-1a3f-4c5e-8d6b-7a9f0e1d2c3b",
  "name": "Platform Co",
  "status": "active",
  "member_webhooks_enabled": true
}

Both calls return 403 not_organisation_adminif you don't administer an active organization.

Make sure your own partner account has a webhook endpoint for the environment. It is configured once on your admin account (partner portal → Webhooks, or send Crebit support the URL), and all copies use it.

What You Receive

While the setting is on, every webhook event of every active member is also delivered to your endpoint:

  • The existing event types: payout_success, payout_failed, payout_transaction_hash_corrected, contract_settled, contract_expired, margin_call_issued, margin_call_paid and margin_call_unpaid_closed (payloads on Crypto: Outbound webhooks). The body is the member's event, with a subject that names the member.
  • Signed with your signing secret, with the same retries and replay as your own events.
  • Listed in your own webhook event history, next to your own events.
  • Only active members are copied: once you remove a member, its new events are no longer sent to you.
http, delivery headers code sample
http, delivery headers
X-Crebit-Signature: t=1791034988,v1=<hex HMAC-SHA256, your signing secret>
X-Crebit-Timestamp: 1791034988
X-Crebit-Event-Id: 0c6f2a9e-7d41-4b8e-a3c5-9e1f2d3c4b5a
X-Crebit-Idempotency-Key: org-member:2b7e9d4c-1a3f-4c5e-8d6b-7a9f0e1d2c3b:payout_success:b7c2e9a4-1f6d-4b3e-8a5c-9d0e1f2a3b4c
X-Crebit-Subject-Relationship: organisation_member
X-Crebit-Subject-Partner-Id: 8f3c2a1e-4b5d-4e6f-9a7b-1c2d3e4f5a6b
json, webhook body code sample
json, webhook body
{
  "event_type": "payout_success",
  "fx_contract_id": "a3d8f1c6-5e2b-4c7a-9f0d-8b1e2c3d4f5a",
  "payout_id": "b7c2e9a4-1f6d-4b3e-8a5c-9d0e1f2a3b4c",
  "amount": "1250.00",
  "currency": "USDC",
  "chain": "solana",
  "transaction_hash": "4kMemberPayoutTxSignature1111111",
  "status": "confirmed",
  "timestamp": "2026-10-02T13:43:08Z",
  "crebit_contract_reference": "CREBIT-20261001-2C8E4A1F9B",
  "partner_transaction_reference": "member-tx-5521",
  "payout_wallet_address": "So11111111111111111111111111111111111111112",
  "transaction_explorer_url": "https://solscan.io/tx/4kMemberPayoutTxSignature1111111",
  "subject": {
    "relationship": "organisation_member",
    "partner_id": "8f3c2a1e-4b5d-4e6f-9a7b-1c2d3e4f5a6b",
    "partner_name": "Member Co",
    "organisation_id": "2b7e9d4c-1a3f-4c5e-8d6b-7a9f0e1d2c3b",
    "organisation_name": "Platform Co"
  }
}

Identify the Member

Every outbound payload, yours included, has a top-level subject:

subject fieldYour own eventCopy of a member's event
relationshipselforganisation_member
partner_idYour partner idThe member's partner id
partner_nameYour nameThe member's name
organisation_idnullYour organization id
organisation_namenullYour organization name
  • Route on subject.relationship; when it is organisation_member, look up the member by subject.partner_id (the same id you use in X-Crebit-Acting-As-Partner-Id).
  • X-Crebit-Subject-Relationship and X-Crebit-Subject-Partner-Id carry the same values as headers for quick routing. They are not signed: the body subject, covered by the signature, is canonical.

A side-by-side example and routing pseudo-code are on Webhooks: Who is this event for?.

Idempotency and Dedupe

  • A copy has its own X-Crebit-Event-Id and the idempotency key org-member:{organisation_id}:{original_idempotency_key}, for example org-member:2b7e9d4c-1a3f-4c5e-8d6b-7a9f0e1d2c3b:payout_success:<payout_id>.
  • Dedupe on X-Crebit-Event-Id or X-Crebit-Idempotency-Key: retries and replays of the same copy keep both values.
  • The member's own delivery of the same event (to its own endpoint) has a different event id and idempotency key. To link the two, use the business ids in the body (for example payout_id or fx_contract_id).

Member KYB Status Event

organisation_member.kyb_status_changedis sent to you whenever a member's KYB status changes, for example when Crebit approves the application you submitted with KYB via API. It goes to the organization admin only, and it is sent even when member webhooks are off.

FieldNotes
event_typeorganisation_member.kyb_status_changed
organisation_idYour organization
member_partner_id, member_partner_nameThe member whose KYB changed
previous_kyb_status, kyb_statusStatus before and after: not_started, draft, invite_sent, under_review, needs_info, approved, rejected
kyb_application_idRelated KYB application, or null
timestampWhen the status changed (UTC)
subjectrelationship organisation_member, naming the member
json, webhook body code sample
json, webhook body
{
  "event_type": "organisation_member.kyb_status_changed",
  "organisation_id": "2b7e9d4c-1a3f-4c5e-8d6b-7a9f0e1d2c3b",
  "member_partner_id": "8f3c2a1e-4b5d-4e6f-9a7b-1c2d3e4f5a6b",
  "member_partner_name": "Member Co",
  "previous_kyb_status": "under_review",
  "kyb_status": "approved",
  "kyb_application_id": "KYB-2026-000123",
  "timestamp": "2026-10-02T15:20:00Z",
  "subject": {
    "relationship": "organisation_member",
    "partner_id": "8f3c2a1e-4b5d-4e6f-9a7b-1c2d3e4f5a6b",
    "partner_name": "Member Co",
    "organisation_id": "2b7e9d4c-1a3f-4c5e-8d6b-7a9f0e1d2c3b",
    "organisation_name": "Platform Co"
  }
}

KYB is production-only, so this event mostly fires on production. Polling kyb_status on GET /api/v1/partners/organisation/members remains available as a fallback.

Sandbox and Fiat

  • Member webhooks work in sandbox too. Organizations, memberships and member_webhooks_enabledare mirrored to sandbox, so your members' events on the sandbox host (https://lock-apis-sandbox.crebitpay.com) are copied to your sandbox webhook endpoint.
  • There are still no fiat webhooks. Member webhooks only cover the existing crypto event types listed above; poll fiat orders as described on Fiat.

Isolation

  • Quotes, contracts and orders you create while acting as a member belong to the member, as if it had called with its own keys.
  • They appear in the member's partner portal, not in yours. Without the header, your own calls only see your own book.
  • To read or act on them later, send the same acting-as header.
  • Outbound webhooks for them go to the member's configured webhook endpoint, if it has one. The member configures it in its own partner portal (or Crebit does); the acting-as header doesn't let you change it. To get the events yourself, turn on member webhooks: you then receive a copy on your own endpoint as well.
  • Limits, fees and fiat readiness are the member's.
  • Cross-organisation access is denied: acting as a partner that is not an active member of your organization returns 403 acting_as_not_allowed.

Partner Portal

Organization admins also see an Organization page in the partner portal. Portal admins can view the organization and its members. Only the portal super admin can create new members (credentials are shown once) and remove members. Re-adding a removed member is done with the API (POST …/members/attach), and so is managing a member's API keys. The same page has the Member webhooks toggle (see Enable member webhooks).

Environments

Production https://lock-apis.crebitpay.com is the source of truth for organizations. Sandbox https://lock-apis-sandbox.crebitpay.com keeps a copy.

  • Members you create, remove or re-add on the production host are mirrored to sandbox automatically, so the same member (same partner id) can be acted as in both environments.
  • Creating members only works on the production host.
  • Removing or re-adding a member directly on the sandbox host changes sandbox only; production is not updated. Make membership changes on the production host.
  • If the sandbox copy can't be updated, the production change still stands and the response has peer_sync_pending: true with peer_sync_error (create member uses peer_finalize_pending / peer_finalize_error). Sandbox catches up on the next membership change for your organization, or contact Crebit.
  • Call GET /api/v1/partners/acting-as-partners on each host to see who you can act as there.
  • The member_webhooks_enabled setting is mirrored to sandbox with your organization (see Sandbox and fiat).

Errors

Errors use the standard envelope { code, message, details }.

StatuscodeWhen
400bad_requestX-Crebit-Acting-As-Partner-Id is not a UUID; a required provision field is blank; or a member API key call's environment differs from X-Crebit-Environment
400organisation_cannot_manage_adminManaging API keys with your own partner id in the path
403organisation_member_not_activeManaging API keys of a partner that is not an active member of your organization (never added, removed, or inactive)
403environment_not_allowedX-Crebit-Environment doesn't match the host (sandbox on production or the reverse)
409active_api_key_existsCreating a member key while the member already has an active key for that environment
400acting_as_selfThe acting-as id is your own partner id
400acting_as_requiredThe endpoint requires the acting-as header (KYB via API) and it is missing
403acting_as_not_allowedYou don't administer an active organization, or the partner is not an active member (never added, removed, or inactive), or the partner administers an active organization
403not_organisation_adminMember management or GET/PATCH /api/v1/partners/organisation called by a partner that is not the admin of an active organization
403organisation_attach_not_allowedAttaching a partner that was never a member of your organization
403forbiddenCreating a member on the sandbox host (production only)
400organisation_member_is_adminAttaching the organization admin as a member
400organisation_cannot_remove_adminRemoving the organization admin
400partner_not_activeAttaching a suspended or inactive partner
400weak_passwordsuper_admin_password does not meet the password policy
404not_foundRemoving a partner that has no membership in your organization; or revoking a key that isn't the member's or is for the other environment
409organisation_member_existsAttaching a partner that is already an active member
409organisation_member_is_org_adminAttaching (or managing the keys of) a partner that administers an active organization of its own
409conflictCreating a member whose super_admin_email is already registered
422validation_errorRequest body fails schema validation (missing field, wrong type, length, unknown field)
503service_unavailableAnother member creation is in progress; retry shortly
503partner_provisioning_failedMember creation could not finish provisioning; contact Crebit before retrying

Product-specific errors (for example 403 fiat_spot_not_enabled for members not yet approved for fiat) are listed on the Fiat, Crypto and KYB via API pages.