For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
GuidesAPI Reference
GuidesAPI Reference
  • Reference
    • Introduction
      • POSTCreate Grant Approval
      • POSTCreate Grant
      • GETRetrieve Grant
      • POSTRevoke Grant
      • POSTCreate Grant Alias
      • POSTStart Grant Link Flow
      • POSTGrant status updated
LogoLogo
ReferenceGrants - Afterpay

Start Grant Link Flow

POST
/v2/grants/start
POST
/v2/grants/start
$curl -X POST https://global-api-sandbox.afterpay.com/v2/grants/start \
> -H "Content-Type: application/json" \
> -u "<username>:<password>" \
> -d '{
> "alias": "my-afterpay-email@gmail.com",
> "requestId": "123e4567-e89b-12d3-a456-426614174000"
>}'
1{
2 "token": "005.2fkv5o963b132z8ppa34srlh60987y87d55re237wsg9tr4q2",
3 "requestId": "123e4567-e89b-12d3-a456-426614174000",
4 "expiresAt": "2025-03-22T12:00:00Z",
5 "deliveryType": "SMS"
6}
Initiates the headless grant link flow process.
Was this page helpful?
Previous

Grant status updated

Next
Built with

Authentication

AuthorizationBasic

Basic authentication of the form Basic <base64(username:password)>.

Headers

AcceptstringOptionalDefaults to application/json

Request

This endpoint expects an object.
aliasstringRequired
Email or phone number associated with the consumer's account
requestIdstringRequired
A unique identifier for this request

Response

Created
tokenstring
Token identifying the grant to be created
requestIdstring
The unique identifier from the request
expiresAtstringformat: "date-time"
When this link attempt will expire
deliveryTypeenum
How the verification code was delivered to the consumer
Allowed values:

Errors

404
Not Found Error
412
Precondition Failed Error
429
Too Many Requests Error