> ## Documentation Index
> Fetch the complete documentation index at: https://docs.avraapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List supported currency codes

> Retrieve the active Currency code list, including CBSL target codes.

<Info>
  **Live Testing Guide:** Before using **Try it**, create a Development project, then enter its **Client ID** and **Client Secret**. Configure the relevant provider for that project before sending the request.
</Info>

Use this route before rendering a currency selector or accepting a currency code from a user. It returns the active set at request time, so do not hard-code the count or assume every ISO 4217 code is enabled.

The response includes standard codes such as `USD` and `LKR`, plus the CBSL target codes `LKR-SELL`, `LKR-BUY`, and `LKR-CBSL` when active. Those three are valid only as a `target` in the pair routes; they are not ordinary currencies to use as a base.

## API endpoint

```text title="GET" theme={null}
https://avraapi.com/api/v1/utility/currency/codes
```

## Request

```bash curl theme={null} theme={null}
curl "https://avraapi.com/api/v1/utility/currency/codes" \
  -H "X-API-KEY: YOUR_PROJECT_CLIENT_ID" \
  -H "X-API-SECRET: YOUR_PROJECT_CLIENT_SECRET" \
  -H "X-ENV: development" \
  -H "Accept: application/json"
```

## Response

The list below is shortened for readability. `data.codes` contains every active code returned by the API.

```json theme={null}
{
  "success": true,
  "request_id": "d57a5f8b-69bc-4877-8da7-31bb9dbfa575",
  "data": {
    "count": 169,
    "codes": [
      {
        "code": "AED",
        "name": "UAE Dirham"
      },
      {
        "code": "AFN",
        "name": "Afghan Afghani"
      },
      {
        "code": "ALL",
        "name": "Albanian Lek"
      }
    ]
  }
}
```

## Error codes

| HTTP | `error.code` | When it happens |
| - | - | - |
| `401` | <span style={{ whiteSpace: 'nowrap' }}><code>unauthorized</code></span> | The Project Client ID or Client Secret is missing, invalid, inactive, or does not match the selected environment. |
| `422` | <span style={{ whiteSpace: 'nowrap' }}><code>provider\_selection\_failed</code></span> | The Currency provider cannot be selected for the project environment. |
| `429` | <span style={{ whiteSpace: 'nowrap' }}><code>rate\_limit\_exceeded</code></span> | The project has exceeded the Currency service request limit. Wait for `Retry-After` before retrying. |
| `503` | <span style={{ whiteSpace: 'nowrap' }}><code>project\_paused</code></span> | The project is paused and cannot make API requests. |

All failures use the standard AvraAPI error envelope. Keep the `request_id` when contacting support; see the [REST API guide](/api-reference/rest-api#common-response-behaviour) for the shared response format.

## Use the response safely

Cache the list only for the lifetime that makes sense for your UI and refresh it from the endpoint before relying on a newly added or removed code. Keep `request_id` with support records when a code unexpectedly becomes unavailable.

For CBSL target meanings and the direct-data fallback rule, read [CBSL Rates](/api-reference/cbsl-rates).

## Playground resources

The generated reference below lists this endpoint's API standard details: request fields, authorizations, and response schema. The complete integration guide, request and response examples, and endpoint-specific error handling are above.


## OpenAPI

````yaml api-reference/provider-api.openapi.yaml GET /utility/currency/codes
openapi: 3.0.3
info:
  title: AvraAPI Provider API
  version: 1.0.0
  description: >-
    The reviewed public contract for AvraAPI provider services. Operations are
    added to this document only after their route, validation, response,
    privacy, usage, and public-safety contracts have been verified.
servers:
  - url: https://avraapi.com/api/v1
    description: AvraAPI REST API v1
security:
  - ApiKeyHeader: []
    ApiSecretHeader: []
tags:
  - name: Currency
    description: Currency codes, exchange rates, and conversion.
  - name: SMS
    description: Messaging operations through configured AvraAPI providers.
  - name: Security
    description: IP and email security checks.
  - name: Location
    description: IP geolocation and intelligence.
  - name: Utilities
    description: QR code, barcode, and PDF generation.
paths:
  /utility/currency/codes:
    get:
      tags:
        - Currency
      summary: List supported currency codes
      description: >-
        Returns every active currency code available to the Currency service,
        including the CBSL target codes. Use this before accepting a currency
        selection from a user. Example values in this reference are illustrative
        only; the live list and count can change.
      operationId: listCurrencyCodes
      parameters:
        - $ref: '#/components/parameters/XEnvironmentHeader'
        - $ref: '#/components/parameters/AcceptJsonHeader'
        - $ref: '#/components/parameters/XPrivacyModeHeader'
      responses:
        '200':
          description: Active currency codes.
          headers:
            X-APIX-Request-ID:
              $ref: '#/components/headers/RequestIdHeader'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CurrencyCodesResponse'
              examples:
                illustrative:
                  summary: Illustrative response shape
                  value:
                    success: true
                    request_id: 01f00000-0000-4000-8000-000000000001
                    data:
                      count: 4
                      codes:
                        - code: AUD
                          name: Australian Dollar
                        - code: LKR
                          name: Sri Lankan Rupee
                        - code: LKR-SELL
                          name: Sri Lankan Rupee (CBSL Sell Rate)
                        - code: USD
                          name: US Dollar
        '401':
          description: >-
            Missing, invalid, inactive, or environment-mismatched project
            credentials.
          headers:
            X-APIX-Request-ID:
              $ref: '#/components/headers/RequestIdHeader'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CurrencyUnauthorizedErrorEnvelope'
              examples:
                unauthorized:
                  value:
                    success: false
                    request_id: 3c90c3cc-0d44-4b50-8888-8dd25736052a
                    error:
                      code: unauthorized
                      message: <string>
                      details: {}
                    meta: {}
        '422':
          description: >-
            The Currency provider cannot be selected for the project
            environment.
          headers:
            X-APIX-Request-ID:
              $ref: '#/components/headers/RequestIdHeader'
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CurrencyProviderSelectionFailedErrorEnvelope
              examples:
                provider_selection_failed:
                  value:
                    success: false
                    request_id: 3c90c3cc-0d44-4b50-8888-8dd25736052a
                    error:
                      code: provider_selection_failed
                      message: <string>
                      details: {}
                    meta: {}
        '429':
          description: The configured Currency request limit has been reached.
          headers:
            X-APIX-Request-ID:
              $ref: '#/components/headers/RequestIdHeader'
            Retry-After:
              $ref: '#/components/headers/RetryAfterHeader'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CurrencyRateLimitedErrorEnvelope'
              examples:
                rate_limit_exceeded:
                  value:
                    success: false
                    request_id: 3c90c3cc-0d44-4b50-8888-8dd25736052a
                    error:
                      code: rate_limit_exceeded
                      message: <string>
                      details: {}
                    meta: {}
        '503':
          description: The project is paused and cannot make API requests.
          headers:
            X-APIX-Request-ID:
              $ref: '#/components/headers/RequestIdHeader'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CurrencyProjectPausedErrorEnvelope'
              examples:
                project_paused:
                  value:
                    success: false
                    request_id: 3c90c3cc-0d44-4b50-8888-8dd25736052a
                    error:
                      code: project_paused
                      message: <string>
                      details: {}
                    meta: {}
components:
  parameters:
    XEnvironmentHeader:
      name: X-ENV
      in: header
      required: false
      description: >-
        Selects the Development credential environment. The Documentation
        Playground exposes Development values only; normal backend integrations
        may use their documented Production credentials outside this tool.
      schema:
        type: string
        enum:
          - dev
          - development
        default: development
    AcceptJsonHeader:
      name: Accept
      in: header
      required: false
      description: Requests a JSON response where the selected operation supports JSON.
      schema:
        type: string
        example: application/json
    XPrivacyModeHeader:
      name: X-Privacy-Mode
      in: header
      required: false
      description: >-
        Optional privacy override. Turn this on to request that AvraAPI suppress
        request-payload storage in observability logs for this request.
      schema:
        type: boolean
        default: false
        example: true
  headers:
    RequestIdHeader:
      description: AvraAPI request identifier for support and troubleshooting.
      schema:
        type: string
        format: uuid
    RetryAfterHeader:
      description: Seconds to wait before retrying a rate-limited request.
      schema:
        type: integer
        minimum: 0
  schemas:
    CurrencyCodesResponse:
      allOf:
        - $ref: '#/components/schemas/ApiSuccessEnvelope'
        - type: object
          properties:
            data:
              $ref: '#/components/schemas/CurrencyCodesData'
    CurrencyUnauthorizedErrorEnvelope:
      type: object
      required:
        - success
        - request_id
        - error
      properties:
        success:
          type: boolean
          enum:
            - false
        request_id:
          type: string
          format: uuid
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - unauthorized
              example: unauthorized
            message:
              type: string
            details:
              type: object
              additionalProperties: true
        meta:
          type: object
          additionalProperties: true
    CurrencyProviderSelectionFailedErrorEnvelope:
      type: object
      required:
        - success
        - request_id
        - error
      properties:
        success:
          type: boolean
          enum:
            - false
        request_id:
          type: string
          format: uuid
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - provider_selection_failed
              example: provider_selection_failed
            message:
              type: string
            details:
              type: object
              additionalProperties: true
        meta:
          type: object
          additionalProperties: true
    CurrencyRateLimitedErrorEnvelope:
      type: object
      required:
        - success
        - request_id
        - error
      properties:
        success:
          type: boolean
          enum:
            - false
        request_id:
          type: string
          format: uuid
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - rate_limit_exceeded
              example: rate_limit_exceeded
            message:
              type: string
            details:
              type: object
              additionalProperties: true
        meta:
          type: object
          additionalProperties: true
    CurrencyProjectPausedErrorEnvelope:
      type: object
      required:
        - success
        - request_id
        - error
      properties:
        success:
          type: boolean
          enum:
            - false
        request_id:
          type: string
          format: uuid
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - project_paused
              example: project_paused
            message:
              type: string
            details:
              type: object
              additionalProperties: true
        meta:
          type: object
          additionalProperties: true
    ApiSuccessEnvelope:
      type: object
      required:
        - success
        - request_id
        - data
      properties:
        success:
          type: boolean
          enum:
            - true
        request_id:
          type: string
          format: uuid
          description: Include this value when contacting AvraAPI support.
        data:
          description: Operation-specific result data.
          nullable: true
    CurrencyCodesData:
      type: object
      required:
        - count
        - codes
      properties:
        count:
          type: integer
          minimum: 0
          description: Number of active codes returned in this response.
        codes:
          type: array
          items:
            $ref: '#/components/schemas/CurrencyCode'
    CurrencyCode:
      type: object
      required:
        - code
        - name
      properties:
        code:
          type: string
          description: Active standard or CBSL pseudo-currency code.
          example: USD
        name:
          type: string
          example: US Dollar
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        Your Development project's Client ID. Enter your own value in the
        Documentation Playground.
    ApiSecretHeader:
      type: apiKey
      in: header
      name: X-API-SECRET
      description: >-
        Your Development project's Client Secret. Mintlify does not proxy these
        requests; the browser sends them directly to AvraAPI. Never enter a
        Production secret in the Documentation Playground.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.