> For the complete documentation index, see [llms.txt](https://docs.reveel.id/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.reveel.id/api-references/payids.md).

# PayIDs

## Claim a PayID

> Claims a PayID for a user. All PayIDs are currently free to claim.\
> \
> The PayID must meet these requirements:\
> \- Must contain only letters, numbers, hyphens, and underscores\
> \- Must be at least 1 character long\
> \- Must not be already claimed by another user\
> \
> Users can only have one active PayID at a time. If a user claims a new PayID,\
> their previous PayID will be automatically replaced.<br>

```json
{"openapi":"3.0.0","info":{"title":"PayID REST API - Pay IDs","version":"1.0.0"},"servers":[{"url":"https://api.reveel.id/v1","description":"Production API Server"},{"url":"https://staging-api.reveel.id/v1","description":"Staging API Server"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"API keys are provided when a partner account is created and can be regenerated if needed.\nTo authenticate requests, include your API key in the request headers using the Bearer token format:\n`Authorization: Bearer your-api-key`\n"}},"schemas":{"ValidationError":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":"string"}},"message":{"type":"string"}}}}}}}}}},"Error":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true}}}}}}},"paths":{"/pay-ids":{"post":{"summary":"Claim a PayID","description":"Claims a PayID for a user. All PayIDs are currently free to claim.\n\nThe PayID must meet these requirements:\n- Must contain only letters, numbers, hyphens, and underscores\n- Must be at least 1 character long\n- Must not be already claimed by another user\n\nUsers can only have one active PayID at a time. If a user claims a new PayID,\ntheir previous PayID will be automatically replaced.\n","tags":["Pay ID"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","payId","expiresInYears"],"properties":{"email":{"type":"string","format":"email","description":"Email address of the user"},"twitterUsername":{"type":"string","description":"Twitter username of the user"},"payId":{"type":"string","description":"The PayID to claim. Can only contain letters, numbers, hyphens, and underscores.\nMust match the pattern [a-zA-Z0-9-_]+\n"},"expiresInYears":{"type":"integer","minimum":1,"maximum":10,"description":"Number of years until the PayID expires (1-10)"}}}}}},"responses":{"201":{"description":"PayID claimed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"payId":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"transactionId":{"type":"string","format":"uuid"}}},"meta":{"type":"object","properties":{"message":{"type":"string"}}}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"PayID already taken","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Search for PayIDs and retrieve user information

> Search for PayIDs based on query parameters. The search is case-insensitive\
> and will return partial matches.<br>

```json
{"openapi":"3.0.0","info":{"title":"PayID REST API - Pay IDs","version":"1.0.0"},"servers":[{"url":"https://api.reveel.id/v1","description":"Production API Server"},{"url":"https://staging-api.reveel.id/v1","description":"Staging API Server"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"API keys are provided when a partner account is created and can be regenerated if needed.\nTo authenticate requests, include your API key in the request headers using the Bearer token format:\n`Authorization: Bearer your-api-key`\n"}},"schemas":{"PayId":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","description":"The PayID name. Can only contain letters, numbers, hyphens, and underscores.\nMust match the pattern [a-zA-Z0-9-_]+\n"},"userId":{"type":"string","format":"uuid","nullable":true},"status":{"type":"string","enum":["ACTIVE","RESERVED"]},"expiresAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"ValidationError":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":"string"}},"message":{"type":"string"}}}}}}}}}},"Error":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true}}}}}}},"paths":{"/pay-ids/search":{"get":{"summary":"Search for PayIDs and retrieve user information","description":"Search for PayIDs based on query parameters. The search is case-insensitive\nand will return partial matches.\n","tags":["Pay ID"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1},"description":"Search query (minimum 1 character)"},{"name":"limit","in":"query","schema":{"type":"integer","default":10,"maximum":100},"description":"Maximum number of results to return (up to 100)"},{"name":"activeOnly","in":"query","schema":{"type":"boolean","default":true},"description":"When true, only returns active PayIDs (not temporary reservations)"}],"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/PayId"}}}},"meta":{"type":"object","properties":{"count":{"type":"integer"},"message":{"type":"string"}}}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## The Error object

```json
{"openapi":"3.0.0","info":{"title":"PayID REST API - Pay IDs","version":"1.0.0"},"components":{"schemas":{"Error":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true}}}}}}}}
```

## The ValidationError object

```json
{"openapi":"3.0.0","info":{"title":"PayID REST API - Pay IDs","version":"1.0.0"},"components":{"schemas":{"ValidationError":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":"string"}},"message":{"type":"string"}}}}}}}}}}}}}
```

## The PayId object

```json
{"openapi":"3.0.0","info":{"title":"PayID REST API - Pay IDs","version":"1.0.0"},"components":{"schemas":{"PayId":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","description":"The PayID name. Can only contain letters, numbers, hyphens, and underscores.\nMust match the pattern [a-zA-Z0-9-_]+\n"},"userId":{"type":"string","format":"uuid","nullable":true},"status":{"type":"string","enum":["ACTIVE","RESERVED"]},"expiresAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.reveel.id/api-references/payids.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
