Recurly External Accounts API

The external-accounts API from Recurly — 2 operation(s) for external-accounts.

GitHub OpenAPI

Operations 5

GET /accounts/{account_code}/external_accounts Lists an Account's External Accounts #
POST /accounts/{account_code}/external_accounts Creates an External Account for an Account #
GET /accounts/{account_code}/external_accounts/{external_account_uuid} Fetch an Account's External Account #
PUT /accounts/{account_code}/external_accounts/{external_account_uuid} Updates an External Account for an Account #
DELETE /accounts/{account_code}/external_accounts/{external_account_uuid} Delete External Account Record #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/recurly:recurly-external-accounts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

recurly-external-accounts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Recurly V2 External Accounts API
  description: '# Getting Started

    Welcome to the reference documentation for Recurly''s XML API v2. Here you will find a complete

    reference for all API v2 operations. If you''re building a new product, or just getting started with Recurly, we recommend

    using our newer JSON API v3. Now let''s get started with API v2. # Authentication

    ##### API Authentication (HTTP Basic)

    Recurly uses HTTP Basic Authentication—your Private API key is securely encrypted by the SSL channel. If you are testing the API calls via the command line with cURL, try:


    ```

    curl -H ''Accept: application/xml'' \

    -H ''X-Api-Version: 2.29'' \

    -H ''Content-Type: application/xml; charset=utf-8'' \

    -u ''[apikey]'' \

    https://[subdomain].recurly.com/v2/accounts

    ```


    Replace `[apikey]` and `[subdomain]` with the appropriate values for your site. ##### Calculating your own authorization header

    Most programming languages encode the authorization header automatically. With HTTP Basic Authentication, the `Authorization` header is a string containing a Base-64 encoded username and password. In the case of Recurly''s API, you need only specify the username as your API key. If your library requires a password, set it to an empty string. ```

    "Authorization": "Basic " + base64_encode(API Key)

    ```


    ##### Additional Request Headers

    **Accept Header**


    Recurly API v2 returns results as XML. Your requests should always include the header requesting the results as XML:


    ```

    Accept: application/xml

    ```


    **Content-Type Header**


    When sending data to Recurly in a POST or PUT request, your request must specify the content type of your request:


    ```

    Content-Type: application/xml; charset=utf-8

    ```


    **X-Api-Version Header**


    When sending data to Recurly, your request should specify the API version you''re attempting to interact with:

    ```

    X-Api-Version: 2.29

    ```

    You learn more about the different versions in the API Versioning section. ##### Public API Key

    Recurly uses two types of API keys: public and private. The Public API key is used by Recurly.js to identify its requests as belonging to your Recurly site. This key can be safely included in Javascript code. Recurly provides each site with one Public Key. The Public API Key can be regenerated on the API Credentials page. ##### Private API Keys


    ###### Treat your Private API Keys like passwords! The API key allows access to your site''s data. Do not include it in Javascript code exposed to browsers. Recurly supports the use of multiple Private API keys, which can be used to integrate third party services using unique, controlled credentials. **Limits & Pricing**


    Merchants on the Starter or grandfathered Recurly plans or merchants in sandbox mode will be granted 5 private API keys. Merchants on Recurly''s Professional plan will be granted 10 private API keys. **Default Key**


    Your default private API key should be used to integrate Recurly with your backend systems. There will be at least one key active at all times. **Additional Keys**


    Additional private API keys should be used to connect your Recurly data to additional sources, like analytics software, accounting packages, or email tools. Recurly recommends clearly labeling the name of each key to identify the associated vendor. **Regenerating Private API Keys**


    Your API key can be regenerated by clicking on the Regenerate button on the API credentials page. When you generate a private API key, you have two options:


    1. Block the old key immediately. This is primarily recommended when the security of a key has been compromised. 2. Allow the old key access for 12 hours. This is primarily used when updating systems and a smooth transition between keys is needed. *If a private API key is changed, an email alert will be sent to your Recurly Site Technical Contact.*


    **Read-Only Keys**


    When creating a private key, you will have the option to set the key to “read-only”. This means the API key may make GET requests but cannot not PUT, POST or DELETE requests.'
  version: '2.29'
servers:
- url: https://{subdomain}.{domain}/v2
  variables:
    subdomain:
      description: Subdomain of your Recurly site.
      default: my-super-successful-company
    domain:
      description: Domain of your Recurly site.
      default: recurly.com
security:
- api_key: []
tags:
- name: external-accounts
  x-displayName: External Accounts
paths:
  /accounts/{account_code}/external_accounts:
    get:
      summary: Lists an Account's External Accounts
      description: 'See the Pagination Guide

        to learn how to use pagination in the API and Client Libraries.'
      tags:
      - external-accounts
      parameters:
      - in: path
        name: account_code
        schema:
          type: string
          default: ''
        required: true
        description: Account's unique code.
      operationId: listAccountExternalAccounts
      responses:
        '200':
          description: ''
          content:
            application/xml:
              example: "<external_accounts type=\"array\">\n  <external_account href=\"https://your-subdomain.recurly.com/v2/accounts/account-code/external_accounts/smygx37luhzx\">\n    <id>smygx37luhzx</id>\n    <external_account_code>e54f884c-59d7-44e4-9bf2-752ea0d8f268</external_account_code>\n    <external_connection_type>AppleAppStore</external_connection_type>\n    <created_at type=\"datetime\">2023-04-03T15:44:05Z</created_at>\n    <updated_at type=\"datetime\">2023-04-03T15:44:05Z</updated_at>\n  </external_account>\n</external_accounts>"
        '404':
          description: ''
          content:
            application/xml:
              example: "<error>\n  <symbol>not_found</symbol>\n  <description lang=\"en-US\">Couldn't find Account with account_code</description>\n</error>"
      x-codeSamples:
      - lang: PHP
        source: "<?php\n\ntry {\n  $account = Recurly_Account::get('uuid');\n  $external_accounts = $account->getExternalAccounts();\n  foreach ($external_accounts as $external_account) {\n    print \"ExternalAccount: $external_account\\n\";\n  }\n} catch (Recurly_NotFoundError $e) {\n  print \"Invalid account code: $e\";\n}"
      - lang: Ruby
        source: "account = Recurly::Account.find('1')\naccount.external_accounts.find_each do |external_account|\n  puts \"ExternalAccount: #{external_account.inspect}\"\nend"
      - lang: Python
        source: "account = Account.get('1')\nfor external_account in account.external_accounts():\n    print 'ExternalAccount: %s' % external_account"
      - lang: Dotnet
        source: "var account = Helpers.CreateAccount();\naccount.CreateExternalAccount(new ExternalAccount(){\n    ExternalAccountCode = \"external_account_code\",\n    ExternalConnectionType = \"GooglePlayStore\"\n});\nvar externalAccounts = account.GetExternalAccounts();\n\nwhile (externalAccounts.Any())\n{\n    foreach (var externalAccount in externalAccounts) {\n        Console.WriteLine(\"External Account Id: \" + externalAccount.Id);\n        Console.WriteLine(\"External Account ExternalAccountCode: \" + externalAccount.ExternalAccountCode);\n        Console.WriteLine(\"External Account ExternalConnectionType: \" + externalAccount.ExternalConnectionType);\n        Console.WriteLine(\"External Account CreatedAt: \" + externalAccount.CreatedAt);\n        Console.WriteLine(\"External Account UpdatedAt: \" + externalAccount.UpdatedAt);\n    }\n    externalAccounts = externalAccounts.Next;\n}"
    post:
      summary: Creates an External Account for an Account
      tags:
      - external-accounts
      operationId: createAccountExternalAccounts
      parameters:
      - in: path
        name: account_code
        schema:
          type: string
          default: ''
        required: true
        description: Account's unique code.
      requestBody:
        required: true
        content:
          application/xml:
            schema:
              type: object
              required:
              - external_account_code
              - external_connection_type
              properties:
                external_account_code:
                  type: string
                  default: ''
                  description: Represents the account code for the external account.
                external_connection_type:
                  type: string
                  default: ''
                  description: Represents the connection type. `AppleAppStore` or `GooglePlayStore`
      responses:
        '201':
          description: ''
          content:
            application/xml:
              example: "<external_account href=\"https://your-subdomain.recurly.com/v2/accounts/1/external_accounts/snce78zq4j61\">\n  <id>snce78zq4j61</id>\n  <external_account_code>string</external_account_code>\n  <external_connection_type>AppleAppStore</external_connection_type>\n  <created_at type=\"datetime\">2023-04-03T15:44:05Z</created_at>\n  <updated_at type=\"datetime\">2023-04-03T15:44:05Z</updated_at>\n</external_account>"
        '404':
          description: ''
          content:
            application/xml:
              example: "<error>\n  <symbol>not_found</symbol>\n  <description lang=\"en-US\">Couldn't find Account with account_code</description>\n</error>"
      x-codeSamples:
      - lang: xml
        source: "<external_account>\n  <external_account_code>account-code</external_account_code>\n  <external_connection_type>OtherFruitAppStore</external_connection_type>\n</external_account>"
      - lang: PHP
        source: "<?php\ntry {\n  $account = Recurly_Account::get(\"accountCode\");\n  $external_account_info = new Recurly_ExternalAccount();\n  $external_account_info->external_account_code = 'account-code';\n  $external_account_info->external_connection_type = 'AppleAppStore';\n  $account->createExternalAccount($external_account_info);\n} catch (Recurly_ValidationError $e) {\n  // The data are invalid\n  print \"Invalid data: $e\";\n} catch (Recurly_NotFoundError $e) {\n  // Could not find account\n  print \"Not Found: $e\";\n}"
      - lang: Ruby
        source: "account = Recurly::Account.find('1')\nexternal_account_info = (\n  {\n    external_account_code:          'account-code',\n    external_connection_type:       'GooglePlayStore',\n  }\n)\naccount.external_accounts.create!(external_account_info)"
      - lang: Python
        source: "account = Account.get('1')\nexternal_account_info = recurly.ExternalAccount(\n  external_account_code = 'account-code'\n  external_connection_type = 'AppleAppStore'\n)\naccount.create_external_account(external_account_info)"
      - lang: Dotnet
        source: 'var account = Accounts.Get("1");

          var info = new ExternalAccount();

          info.ExternalAccountCode = "account-code";

          info.ExternalConnectionType = "AppleAppStore";

          account.CreateExternalAccount(info);'
  /accounts/{account_code}/external_accounts/{external_account_uuid}:
    get:
      summary: Fetch an Account's External Account
      description: ''
      tags:
      - external-accounts
      parameters:
      - in: path
        name: account_code
        schema:
          type: string
          default: ''
        required: true
        description: Account's unique code.
      - in: path
        name: external_account_uuid
        schema:
          type: string
          default: ''
        required: true
        description: External Account's unique id.
      operationId: fetchAccountExternalAccount
      responses:
        '200':
          description: ''
          content:
            application/xml:
              example: "<external_account href=\"https://your-subdomain.recurly.com/v2/accounts/account-code/external_accounts/smygx37luhzx\">\n  <id>smygx37luhzx</id>\n  <external_account_code>e54f884c-59d7-44e4-9bf2-752ea0d8f268</external_account_code>\n  <external_connection_type>AppleAppStore</external_connection_type>\n  <created_at type=\"datetime\">2023-04-03T15:44:05Z</created_at>\n  <updated_at type=\"datetime\">2023-04-03T15:44:05Z</updated_at>\n</external_account>"
        '404':
          description: ''
          content:
            application/xml:
              example: "<error>\n  <symbol>not_found</symbol>\n  <description lang=\"en-US\">Couldn't find Account with account_code</description>\n</error>"
      x-codeSamples:
      - lang: PHP
        source: "<?php\n\ntry {\n  $account = Recurly_Account::get('uuid');\n  $external_account = $account->getExternalAccount('external_account_uuid');\n  print \"External Account: $external_account\\n\";\n} catch (Recurly_NotFoundError $e) {\n  print \"External Account does not exist\";\n}"
      - lang: Ruby
        source: 'account = Recurly::Account.find(''1'')

          account.external_accounts.find(''2'')'
      - lang: Python
        source: 'account = Account.get(''1'')

          external_account = account.external_accounts().get(''p7gnbhfxbe8o'')'
      - lang: Dotnet
        source: 'using System.Linq;


          var account = Accounts.Get("1");

          var external_account = account.GetExternalAccounts().Get("p7gnbhfxbe8o");'
    put:
      summary: Updates an External Account for an Account
      tags:
      - external-accounts
      operationId: udpateAccountExternalAccount
      parameters:
      - in: path
        name: account_code
        schema:
          type: string
          default: ''
        required: true
        description: Account's unique code.
      - in: path
        name: external_account_uuid
        schema:
          type: string
          default: ''
        required: true
        description: External Account's unique id.
      requestBody:
        required: true
        content:
          application/xml:
            schema:
              type: object
              properties:
                external_account_code:
                  type: string
                  default: ''
                  description: Represents the account code for the external account.
                external_connection_type:
                  type: string
                  default: ''
                  description: Represents the connection type. `AppleAppStore` or `GooglePlayStore`
      responses:
        '200':
          description: ''
          content:
            application/xml:
              example: "<external_account href=\"https://your-subdomain.recurly.com/v2/accounts/1/external_accounts/snce78zq4j61\">\n  <id>snce78zq4j61</id>\n  <external_account_code>string</external_account_code>\n  <external_connection_type>AppleAppStore</external_connection_type>\n  <created_at type=\"datetime\">2023-04-03T15:44:05Z</created_at>\n  <updated_at type=\"datetime\">2023-04-04T15:44:05Z</updated_at>\n</external_account>"
        '404':
          description: ''
          content:
            application/xml:
              example: "<error>\n  <symbol>not_found</symbol>\n  <description lang=\"en-US\">Couldn't find Account with account_code</description>\n</error>"
      x-codeSamples:
      - lang: xml
        source: "<external_account>\n  <external_account_code>f3b5f8ce-34ae-4a95-8f26-fbfc2d9b28b7</external_account_code>\n  <external_connection_type>AppleAppStore</external_connection_type>\n</external_account>"
      - lang: PHP
        source: "<?php\n\ntry {\n  $external_account = $account->getExternalAccount(\"externalAccountId\");\n  $external_account->external_account_code = 'f3b5f8ce-34ae-4a95-8f26-fbfc2d9b28b7';\n  $external_account->external_connection_type = 'AppleAppStore';\n  $external_account->update();\n\n  print \"ExternalAccount $external_account->external_account_code updated\";\n} catch (Recurly_ValidationError $e) {\n  // The data is invalid\n  print \"Invalid data: $e\";\n} catch (Recurly_NotFoundError $e) {\n  // Could not find account\n  print \"Account Not Found: $e\";\n}"
      - lang: Ruby
        source: 'external_account = account.external_accounts.find(''external-account-uuid'')

          external_account.external_account_code = ''1234''

          external_account.save!'
      - lang: Python
        source: 'external_account = account.get_external_account(''externalAccountUuid'')

          external_account.external_account_code = ''f3b5f8ce-34ae-4a95-8f26-fbfc2d9b28b7''

          external_account.external_connection_type = ''AppleAppStore''

          external_account.save()'
      - lang: Dotnet
        source: 'var externalAccount = account.GetExternalAccount("externalAccountUuid");

          externalAccount.ExternalAccountCode = "f3b5f8ce-34ae-4a95-8f26-fbfc2d9b28b7";

          externalAccount.ExternalConnectionType = "AppleAppStore";

          account.UpdateExternalAccount(externalAccount);'
    delete:
      summary: Delete External Account Record
      description: Delete an External Account on your account.
      tags:
      - external-accounts
      operationId: deleteAccountExternalAccount
      parameters:
      - in: path
        name: account_code
        schema:
          type: string
        required: true
        description: Account unique identifier.
      - in: path
        name: external_account_uuid
        schema:
          type: string
        required: true
        description: The unique External Account UUID.
      responses:
        '204':
          description: ''
          content:
            application/json:
              example: 'Status: 204 No Content'
        '404':
          description: External Account not found
          content:
            application/xml:
              example: "<error>\n  <symbol>not_found</symbol>\n  <description lang=\"en-US\">Couldn't find ExternalAccount with id snxskxf3tn4q</description>\n</error>"
        '400':
          description: Unavailable API version
          content:
            application/xml:
              examples:
                unavailable_api_version:
                  summary: Unavailable API version
                  value: "<error>\n  <symbol>unavailable_in_api_version</symbol>\n  <description>This request cannot be completed using this version of the API. It was added in version '2.29'.</description>\n</error>"
                feature_not_enabled:
                  summary: Feature not enabled
                  value: "<error>\n  <symbol>feature_not_enabled</symbol>\n  <description>External Resource Tracking feature is not enabled for your site</description>\n</error>"
      x-codeSamples:
      - lang: PHP
        source: "<?php\n\ntry {\n  $external_account = $account->getExternalAccount('external_account_uuid');\n  $external_account->delete();\n} catch (Recurly_NotFoundError $e) {\n  // Account not found or account does not have external account\n  print \"Not Found: $e\";\n}"
      - lang: Ruby
        source: 'external_account = account.external_accounts.find(''external-account-uuid'')

          external_account.destroy'
      - lang: Python
        source: 'external_account = account.get_external_account("externalAccountUuid")

          external_account.delete()'
      - lang: Dotnet
        source: account.DeleteExternalAccount("externalAccountUuid");
components:
  securitySchemes:
    api_key:
      type: http
      description: Enter the API key as the username and set the password to an empty string. You can locate and manage your API keys from the [API Credentials](https://app.recurly.com/go/developer/api_keys) page.
      scheme: basic