Ressources
Organisations
Chaque point de terminaison Organisations, avec la portée qu'il impose, le corps qu'il accepte, une réponse lisible et les refus qu'il peut renvoyer.
Lister les organisations pour lesquelles cette clé peut agir.
/organizations- Portée
- Aucune portée requise
Idempotency-Key- Non accepté
- Renvoie
- 200
Erreurs
Tous les refus que ce point de terminaison peut renvoyer, avec le statut qui les accompagne.
curl "https://passportcraft.com/api/v1/organizations" \
-H "Authorization: Bearer $PASSPORTCRAFT_API_KEY"{
"object": "list",
"data": [
{
"object": "connection",
"organization_id": "8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2",
"name": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2",
"display_name": "Atelier Nord",
"link_status": null,
"scopes": [
"passports:read",
"passports:write",
"keys:admin"
],
"granted_at": "2026-07-14T11:02:19.004Z"
},
{
"object": "connection",
"organization_id": "3c59dc04-8f7b-4d0e-9c1a-5f2b6e7d8a90",
"name": "organizations/3c59dc04-8f7b-4d0e-9c1a-5f2b6e7d8a90",
"display_name": "Acme Apparel",
"link_status": "accepted",
"scopes": [
"passports:read",
"passports:write"
],
"granted_at": "2026-09-22T08:15:00.000Z"
}
],
"has_more": false,
"next_cursor": null
}GET /organizations
Donner à une clé l'accès à une organisation cliente.
/organizations/{organization}/grants- Portée
- keys:admin
Idempotency-Key- Non accepté
- Renvoie
- 201
Paramètres de chemin
organizationchaîneObligatoireL'organisation cliente. La clé appelante doit disposer de la portée keys:admin sur sa propre organisation, et son organisation doit gérer ce client ; la clé n'a besoin d'aucune autorisation ici.
Corps de la requête
key_idchaîneObligatoireL'identifiant public d'une clé appartenant à votre organisation, dans le même mode que la clé appelante, tel que GET /whoami l'indique dans key_id.
scopestableau de chaînesObligatoireCe que la clé peut faire dans cette organisation. Chaque portée doit être permise par les portées que la clé détient sur sa propre organisation (une portée d'écriture permet aussi la portée de lecture correspondante) ; la portée keys:admin n'est jamais accordée pour un client.
Erreurs
Tous les refus que ce point de terminaison peut renvoyer, avec le statut qui les accompagne.
- 500configuration_error
- 403france_mandate_required
- 409grant_conflict
- 403grantor_not_seated
- 403insufficient_scope
- 500internal_error
- 401invalid_key
- 400invalid_request
- 401key_expired
- 409key_not_grantable
- 401key_revoked
- 401key_rotated
- 400mode_mismatch
- 404organization_not_found_or_not_granted
- 413payload_too_large
- 429rate_limited
- 404resource_not_found
- 422scope_exceeds_key
- 415unsupported_media_type
- 422validation_failed
- 400wildcard_not_supported
curl "https://passportcraft.com/api/v1/organizations/3c59dc04-8f7b-4d0e-9c1a-5f2b6e7d8a90/grants" \
-X POST \
-H "Authorization: Bearer $PASSPORTCRAFT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"key_id": "K3n9Qw2P",
"scopes": [
"passports:read",
"passports:write"
]
}'{
"object": "grant",
"organization_id": "3c59dc04-8f7b-4d0e-9c1a-5f2b6e7d8a90",
"key_id": "K3n9Qw2P",
"scopes": [
"passports:read",
"passports:write"
],
"granted_at": "2026-09-22T08:15:00.000Z"
}POST /organizations/3c59dc04-8f7b-4d0e-9c1a-5f2b6e7d8a90/grants
Mettre fin à l'accès d'une clé à une seule organisation cliente.
/organizations/{organization}/grants/{keyId}- Portée
- keys:admin
Idempotency-Key- Non accepté
- Renvoie
- 200
Paramètres de chemin
organizationchaîneObligatoireL'organisation cliente. La clé appelante doit disposer de la portée keys:admin sur sa propre organisation, et son organisation doit gérer ce client ; la clé n'a besoin d'aucune autorisation ici.
keyIdchaîneObligatoireL'identifiant de la ressource. Traitez-le comme une chaîne opaque.
Erreurs
Tous les refus que ce point de terminaison peut renvoyer, avec le statut qui les accompagne.
curl "https://passportcraft.com/api/v1/organizations/3c59dc04-8f7b-4d0e-9c1a-5f2b6e7d8a90/grants/K3n9Qw2P" \
-X DELETE \
-H "Authorization: Bearer $PASSPORTCRAFT_API_KEY"{
"object": "grant",
"organization_id": "3c59dc04-8f7b-4d0e-9c1a-5f2b6e7d8a90",
"key_id": "K3n9Qw2P",
"status": "revoked"
}DELETE /organizations/3c59dc04-8f7b-4d0e-9c1a-5f2b6e7d8a90/grants/K3n9Qw2P
Décrire ce que cette clé peut faire pour cette organisation.
/organizations/{organization}/capabilities- Portée
- passports:read
Idempotency-Key- Non accepté
- Renvoie
- 200
Paramètres de chemin
organizationchaîneObligatoireL'organisation pour laquelle cette requête agit. La clé doit disposer d'une autorisation sur celle-ci.
Erreurs
Tous les refus que ce point de terminaison peut renvoyer, avec le statut qui les accompagne.
curl "https://passportcraft.com/api/v1/organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/capabilities" \
-H "Authorization: Bearer $PASSPORTCRAFT_API_KEY"{
"object": "list",
"data": [
{
"object": "capability",
"id": "passport_publishing",
"name": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/capabilities/passport_publishing",
"organization_id": "8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2",
"livemode": true,
"requested": true,
"allowed": true,
"verification_status": "valid",
"problems": [],
"detail": {
"plan_id": "pro",
"subscription_status": "trialing",
"publish_limit": 500,
"published_count": 37,
"per_passport_check": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/{id}/validate"
}
},
{
"object": "capability",
"id": "france_affichage_filing",
"name": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/capabilities/france_affichage_filing",
"organization_id": "8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2",
"livemode": true,
"requested": true,
"allowed": false,
"verification_status": "pending",
"problems": [
{
"code": "delegation_required",
"message": "The delegation is awaiting verification against the French portal.",
"type": "pending",
"remediating_actions": [
{
"code": "await_portal_verification",
"message": "No action is required. Poll this capability until verification completes."
}
]
}
],
"detail": {
"delegation_status": "pending",
"portal_brand_id": null,
"delegated_at": "2026-07-30T16:20:00.000Z",
"entitlement": "free_offer",
"free_filing_reason": "available",
"per_passport_requirements": [
"gtin_required",
"attestation_required"
],
"attestation_wording_version": "2026-09-19.1",
"per_passport_check": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/{id}/affichage",
"api_filing_supported": true,
"api_filing_scope": "filings:write"
}
},
{
"object": "capability",
"id": "document_upload",
"name": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/capabilities/document_upload",
"organization_id": "8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2",
"livemode": true,
"requested": true,
"allowed": true,
"verification_status": "valid",
"problems": [],
"detail": {
"document_limit": 50,
"documents_used": 12
}
},
{
"object": "capability",
"id": "live_api_writes",
"name": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/capabilities/live_api_writes",
"organization_id": "8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2",
"livemode": true,
"requested": true,
"allowed": false,
"verification_status": "invalid",
"problems": [
{
"code": "no_subscription",
"message": "Live API writes start when the trial becomes a paid subscription.",
"type": "invalid",
"remediating_actions": [
{
"code": "add_subscription",
"message": "Convert the trial to a paid subscription."
}
]
}
],
"detail": {
"subscription_status": "trialing",
"plan_id": "pro"
}
}
],
"has_more": false,
"next_cursor": null
}GET /organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/capabilities