# API keys

### How do I get an API key?

Contact us at [go.gov.sg/contact-paysg](https://go.gov.sg/contact-paysg) with a valid gov.sg email for an API key to be provisioned. Please ensure that the email address has been used to log in to [staging.pay.gov.sg](https://staging.pay.gov.sg) and [pay.gov.sg](https://pay.gov.sg) before. Note that the API key holder must be added as a Billing collaborator on the payment service.

### Why doesn't my API key work?

Ensure that the email address the API key was issued to is added as a Billing collaborator to the payment service.

### Do I need a new API key for each payment service?

No, API keys are associated with email addresses, not payment services. As long as the API key holder is added as a Billing collaborator on the relevant payment service, the API key can be used to create payments via API.

### Does the API key expire?

No, our API keys do not currently expire.

### What email address should I use for the API key?

We typically suggest teams to use a group email address (e.g. <agency-finance-team@agency.gov.sg>).

### What happens to the API key if the API key holder leaves the organisation?

The API key will still remain valid. However, we strongly suggest the team either use a group email for the API key, or ensure that a new API key is issued to someone within the organisation.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://guide.pay.gov.sg/faq/api-keys.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
