Skip to content
Start here

Upload LOA Document

client.addressing.loaDocuments.create(LOADocumentCreateParams { account_id, loa_document } params, RequestOptionsoptions?): LOADocumentCreateResponse { id, account_id, auto_generated, 5 more }
POST/accounts/{account_id}/addressing/loa_documents

Submit LOA document (pdf format) under the account.

Security

API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Magic Transit Write
ParametersExpand Collapse
params: LOADocumentCreateParams { account_id, loa_document }
account_id: string

Path param: Identifier of a Cloudflare account.

maxLength32
loa_document: string

Body param: LOA document to upload.

ReturnsExpand Collapse
LOADocumentCreateResponse { id, account_id, auto_generated, 5 more }
id?: string | null

Identifier for the uploaded LOA document.

maxLength32
account_id?: string

Identifier of a Cloudflare account.

maxLength32
auto_generated?: boolean

Whether the LOA has been auto-generated for the prefix owner by Cloudflare.

created?: string
formatdate-time
filename?: string

Name of LOA document. Max file size 10MB, and supported filetype is pdf.

size_bytes?: number

File size of the uploaded LOA document.

verified?: boolean

Whether the LOA has been verified by Cloudflare staff.

verified_at?: string | null

Timestamp of the moment the LOA was marked as validated.

formatdate-time

Upload LOA Document

import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted
  apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted
});

const loaDocument = await client.addressing.loaDocuments.create({
  account_id: '258def64c72dae45f3e4c8516e2111f2',
  loa_document: '@document.pdf',
});

console.log(loaDocument.id);
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "d933b1530bc56c9953cf8ce166da8004",
    "account_id": "258def64c72dae45f3e4c8516e2111f2",
    "auto_generated": true,
    "created": "2014-01-01T05:20:00.12345Z",
    "filename": "site_loa_doc.pdf",
    "size_bytes": 444,
    "verified": true,
    "verified_at": "2019-12-27T18:11:19.117Z"
  }
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "d933b1530bc56c9953cf8ce166da8004",
    "account_id": "258def64c72dae45f3e4c8516e2111f2",
    "auto_generated": true,
    "created": "2014-01-01T05:20:00.12345Z",
    "filename": "site_loa_doc.pdf",
    "size_bytes": 444,
    "verified": true,
    "verified_at": "2019-12-27T18:11:19.117Z"
  }
}