Create a kya, pay, or kya-pay token as a buyer agent. Only buyer agents can create tokens; a seller agent key is rejected.

post/api/v1/tokens

Request

  • Base URL
    https://api.skyfire.xyz
  • URL
    https://api.skyfire.xyz/api/v1/tokens
  • Auth
    API key in header skyfire-api-key

Request body

type'kya' | 'pay' | 'kya-pay' required

One of kya, pay, or kya-pay. The created token will contain JWT header typ set to <type>+jwt. Onboarded sellers only accept the token types listed on their service.

buyerTagstring

Buyer’s internal identifier for the token. e.g. "research-agent-xyz". Max 128 characters.

tokenAmountstring

Amount of funds, in USD, allocated to the token. This is the maximum the seller can charge. Required for pay and kya-pay; must be omitted for kya. Plain decimal string: no sign, no exponent. Onboarded sellers accept up to six decimal places and enforce their own minimum. External sellers accept at most two decimal places. Must be greater than zero and no more than the wallet balance.

sellerServiceIdstring

ID of an onboarded seller service. Use this or sellerDomainOrUrl, never both. The service must be active and approved, and must accept the requested token type.

sellerDomainOrUrlstring

Domain name or full URL of an external seller, with or without a scheme. Use this or sellerServiceId, never both. Requires an Organization Buyer API key.

expiresAtinteger

Unix time in seconds at which the token expires. Provide an absolute epoch time, not a duration. Omit to get the maximum lifetime:

  • 24 hours for an onboarded seller
  • 5 minutes for an external seller, or a shorter per-seller maximum where configured.

A supplied value is clamped into the allowed window rather than rejected: anything earlier than 10 seconds from now becomes 10 seconds from now, anything later than the maximum becomes the maximum.

identityPermissionsstring[]

Additional identity fields to include in the token. Allowed on kya and kya-pay; a pay request that includes it is rejected. Defaults to none. See https://docs.skyfire.xyz/reference/identity-fields.

accountIdstring

ID of the agent wallet that funds the token. Defaults to the agent's active wallet on the default stablecoin network. Required, and must be an active Visa or Mastercard wallet, when additionalInfo is provided.

Response

Ok

tokenstring required

The signed JWT for the token.

Changes

    • breaking

      request body became required

    • breaking

      request property was restricted to a list of enum values

    • warning

      removed the optional property // from the response with the status

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new kya enum value to the request property

    • info

      added the new kya-pay enum value to the request property

    • info

      added the new pay enum value to the request property

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status