For Developers
Create Geo
POST https://ed.link/api/v2/teams/:team_id/origin-policies/:policy_id/geos
Adds an ISO country code rule to the origin policy.
Permissions
Requires the origin_policies.create system permission.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
:team_id | UUID | Yes | The ID of the team. |
:policy_id | UUID | Yes | The ID of the origin policy. |
Request Body
| Property | Type | Required | Description |
|---|---|---|---|
country_code | String | Yes | ISO 3166-1 alpha-2 country code (e.g. US, CA, GB). |
Sample Request
const response = await axios.post(
`https://ed.link/api/v2/teams/${team_id}/origin-policies/${policy_id}/geos`,
{
country_code: 'US'
},
{
headers: {
authorization: `Bearer ${user_session_token}`,
'content-type': 'application/json'
}
}
);
Sample Response
{
"$data": {
"id": "e22a4b88-1c39-4d6b-9520-21a4fa800311",
"country_code": "US"
}
}
