KSA v2: Generate an API key

Generate the API key that the KSA ZATCA API v2 requests use, with the access token you get when you sign in. This page documents API v2, a legacy version.

After you sign in, generate your API key with a GET request to the API key generation endpoint. Send your access token in the Authorization header. The response contains your API key, which is valid for one year.

Request parameters

ParameterTypeDescriptionExample
AuthorizationstringThe access token you received when you signed in.eyJhbGciOiJSUzI1NiJ9.example-access-token.signature
envstringThe environment.sandbox

Response parameters

ParameterTypeDescriptionExample
messagestringA description of the status of the request.API key created and linked to the specific API successfully!
apiKeystringThe generated API key.EXAMPLEapiKEY00000000000000000000000000

Next step

Onboard your EGS with the API key.