Skip to main content
POST
/
auth
/
credentials
/
code
Create Credential Code
curl --request POST \
  --url https://api.dfns.io/auth/credentials/code \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-DFNS-USERACTION: <api-key>' \
  --data '{
  "expiration": "2023-11-07T05:31:56Z"
}'
{
  "code": "<string>",
  "expiration": "<string>"
}

Authentication

✅ Organization User (CustomerEmployee)
✅ Delegated User (EndUser)
❌ Personal Access Token not allowed
❌ Service Account

Required Permissions

No permission required.

Authorizations

Authorization
string
header
required

Bearer Token: Used to authenticate API requests. More details how to generate the token: Authentication flows

X-DFNS-USERACTION
string
header
required

User Action Signature: Used to sign the change-inducing API requests. More details how to generate the token: User Action Signing flows

Body

application/json
expiration
required

Code expiration, as an ISO-8601 datetime string or a unix timestamp

Response

200 - application/json

Success

code
string
required
expiration
string
required
I