Create Service Binding

Creates a new Service Binding, routing traffic to IPs within the given CIDR to a service running on Cloudflare's network. **Note:** This API may only be used on prefixes currently configured with a Magic Transit service binding, and only allows creating service bindings for the Cloudflare CDN or Cloudflare Spectrum.

/accounts/{account_identifier}/addressing/prefixes/{prefix_identifier}/bindings

post

IP Address Management Service Bindings

ip-address-management-service-bindings-create-service-binding

Debug "planAvailability"

null

Debug "tokenPermissions"

null

Debug "parameters"

[
  {
    "in": "path",
    "name": "account_identifier",
    "required": true,
    "schema": {
      "description": "Identifier",
      "example": "023e105f4ecef8ad9ca31a8372d0c353",
      "maxLength": 32,
      "readOnly": true,
      "type": "string"
    }
  },
  {
    "in": "path",
    "name": "prefix_identifier",
    "required": true,
    "schema": {
      "description": "Identifier",
      "example": "023e105f4ecef8ad9ca31a8372d0c353",
      "maxLength": 32,
      "readOnly": true,
      "type": "string"
    }
  }
]

Debug "requestBody"

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "cidr": {
            "description": "IP Prefix in Classless Inter-Domain Routing format.",
            "example": "192.0.2.0/24",
            "type": "string"
          },
          "service_id": {
            "description": "Identifier",
            "example": "2db684ee7ca04e159946fd05b99e1bcd",
            "maxLength": 32,
            "type": "string"
          }
        },
        "type": "object"
      }
    }
  }
}

Debug "responses"

{
  "201": {
    "content": {
      "application/json": {
        "schema": {
          "allOf": [
            {
              "properties": {
                "errors": {
                  "example": [],
                  "items": {
                    "properties": {
                      "code": {
                        "minimum": 1000,
                        "type": "integer"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "code",
                      "message"
                    ],
                    "type": "object",
                    "uniqueItems": true
                  },
                  "type": "array"
                },
                "messages": {
                  "example": [],
                  "items": {
                    "properties": {
                      "code": {
                        "minimum": 1000,
                        "type": "integer"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "code",
                      "message"
                    ],
                    "type": "object",
                    "uniqueItems": true
                  },
                  "type": "array"
                },
                "result": {
                  "anyOf": [
                    {
                      "type": "object"
                    },
                    {
                      "items": {},
                      "type": "array"
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "success": {
                  "description": "Whether the API call was successful",
                  "enum": [
                    true
                  ],
                  "example": true,
                  "type": "boolean"
                }
              },
              "required": [
                "success",
                "errors",
                "messages",
                "result"
              ],
              "type": "object"
            },
            {
              "properties": {
                "result": {
                  "properties": {
                    "cidr": {
                      "description": "IP Prefix in Classless Inter-Domain Routing format.",
                      "example": "192.0.2.0/24",
                      "type": "string"
                    },
                    "id": {
                      "description": "Identifier",
                      "example": "023e105f4ecef8ad9ca31a8372d0c353",
                      "maxLength": 32,
                      "readOnly": true,
                      "type": "string"
                    },
                    "provisioning": {
                      "description": "Status of a Service Binding's deployment to the Cloudflare network",
                      "properties": {
                        "state": {
                          "description": "When a binding has been deployed to a majority of Cloudflare datacenters, the binding will become active  and can be used with its associated service.\n",
                          "enum": [
                            "provisioning",
                            "active"
                          ],
                          "example": "provisioning",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "service_id": {
                      "description": "Identifier",
                      "example": "2db684ee7ca04e159946fd05b99e1bcd",
                      "maxLength": 32,
                      "type": "string"
                    },
                    "service_name": {
                      "description": "Name of a service running on the Cloudflare network",
                      "example": "Magic Transit",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            }
          ]
        }
      }
    },
    "description": "The created Service Binding"
  },
  "4xx": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "errors": {
              "allOf": [
                {
                  "example": [],
                  "items": {
                    "properties": {
                      "code": {
                        "minimum": 1000,
                        "type": "integer"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "code",
                      "message"
                    ],
                    "type": "object",
                    "uniqueItems": true
                  },
                  "type": "array"
                }
              ],
              "example": [
                {
                  "code": 7003,
                  "message": "No route for the URI"
                }
              ],
              "minLength": 1
            },
            "messages": {
              "allOf": [
                {
                  "example": [],
                  "items": {
                    "properties": {
                      "code": {
                        "minimum": 1000,
                        "type": "integer"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "code",
                      "message"
                    ],
                    "type": "object",
                    "uniqueItems": true
                  },
                  "type": "array"
                }
              ],
              "example": []
            },
            "result": {
              "enum": [
                null
              ],
              "nullable": true,
              "type": "object"
            },
            "success": {
              "description": "Whether the API call was successful",
              "enum": [
                false
              ],
              "example": false,
              "type": "boolean"
            }
          },
          "required": [
            "success",
            "errors",
            "messages",
            "result"
          ],
          "type": "object"
        }
      }
    },
    "description": "Create Service Binding response failure"
  }
}

Debug "security"

[
  {
    "api_email": [],
    "api_key": []
  }
]