Globagift Docs
API / Developers

API keys

Create, list and revoke merchant API keys.

GET
/v1/api-keys

Authorization

bearerAuth
headerAuthorizationBearer <token>

A merchant API key (gg_...). Each key is limited to its granted scopes.

Response Body

API keys

application/json
  1. response
data*array<>
Example Request
curl -X GET 'https://engine-sandbox.globagift.io/v1/api-keys'
Example Response
{  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "prefix": "string",      "environment": "test",      "scopes": [        "string"      ],      "created_at": "2019-08-24T14:15:22Z",      "revoked_at": "2019-08-24T14:15:22Z"    }  ]}

Create an API key

POST
/v1/api-keys

Retries: not idempotent. After an unclear failure, read the current state before trying again.

Authorization

bearerAuth
headerAuthorizationBearer <token>

A merchant API key (gg_...). Each key is limited to its granted scopes.

Request Body

application/json
  1. body
environment*string
Value in"test""live"
scopes*array<>
Items1 <= items <= 16

Response Body

Key created

application/json
  1. response
id?string
key?string
prefix?string
Example Request
curl -X POST 'https://engine-sandbox.globagift.io/v1/api-keys' \  -H 'Content-Type: application/json' \  -d '{  "environment": "test",  "scopes": [    "products:read",    "cards:issue",    "cards:read"  ]}'
Example Response
{  "id": "string",  "key": "string",  "prefix": "string"}

Revoke an API key

DELETE
/v1/api-keys/{id}

Retries: not idempotent. After an unclear failure, read the current state before trying again.

Authorization

bearerAuth
headerAuthorizationBearer <token>

A merchant API key (gg_...). Each key is limited to its granted scopes.

Path Parameters

id*string

Response Body

Revoked

Example Request
curl -X DELETE 'https://engine-sandbox.globagift.io/v1/api-keys/string'
Example Response
Empty