Hear from Slack, the ACLU, TED, & more at our customer summit in San Francisco Register
LOG IN SIGN UP
Documentation

In addition to the Fastly web interface, we offer a few API functions specific to managing your account, its users, and billing options, and we list them here for ease of reference.

As always, if something does not work as expected or differs from the web interface, please contact us right away via our Support Desk or IRC (#fastly on Freenode, or webchat).

Authentication

Nearly all API calls require your request to be authenticated though a few do not. You will use API tokens to authenticate your requests. See our authentication page for more information.

API reference

The main entry point for the API is https://api.fastly.com/. For the sake of brevity, examples below omit this.

Event Logs

Event logs used to audit actions performed by customers. Events can be filtered by user_id, service_id, customer_id and event_type.


Fields

field type description
admin boolean

Indicates if event was performed by Fastly.

created_at string

Time-stamp (GMT) when the record was created.

customer_id string

ID of the customer who performed the event.

description string

Description of the event.

event_type string

Type of event. Can be used with filter[event_type]. One of:

api_key.create -
address.create -
address.delete -
address.update -
backend.create -
backend.delete -
backend.update -
billing.contact_update -
cache_settings.create -
cache_settings.delete -
cache_settings.update -
customer.create -
customer.pricing -
customer.update -
director.create -
director.delete -
director.update -
director_backend.create -
director_backend.delete -
domain.create -
domain.delete -
domain.update -
gzip.create -
gzip.delete -
gzip.update -
header.create -
header.delete -
header.update -
healthcheck.create -
healthcheck.delete -
healthcheck.update -
invitation.accept -
invitation.sent -
invoice.failed_payment -
invoice.payment -
logging.create -
logging.delete -
logging.update -
request_settings.create -
request_settings.delete -
request_settings.update -
response_object.create -
response_object.delete -
response_object.update -
rule_status.update -
rule_status.upsert -
service.create -
service.delete -
service.move -
service.move_destination -
service.move_source -
service.purge_all -
service.update -
service_authorization.create -
service_authorization.delete -
service_authorization.update -
token.create -
token.destroy -
two_factor_auth.disable -
two_factor_auth.enable -
user.destroy -
user.lock -
user.login -
user.login_failure -
user.logout -
user.password_update -
user.unlock -
user.update -
vcl.create -
vcl.delete -
vcl.update -
version.activate -
version.clone -
version.copy -
version.copy_destination -
version.copy_source -
version.create -
version.deactivate -
version.lock -
version.update -
waf.create -
waf.delete -
waf.update -
waf.ruleset.deploy -
waf.ruleset.deploy_failure -
wordpress.create -
wordpress.delete -
wordpress.update -
ip string

IP address(es) that the event was requested from.

metadata string

Hash of key value pairs of additional information.

service_id string

ID of the service that the event was performed on.

user_id string

ID of the user that performed the event.

Actions

GET /events

List all events for a particular customer

Authentication

API token.

Parameters
parameter type description
filter[customer_id] string

Limit the returned events to a specific customer.

filter[service_id] string

Limit the returned events to a specific service.

filter[event_type] string

Limit the returned events to a specific event type. See above for event codes.

filter[user_id] string

Limit the returned events to a specific user.

page[number] integer

Pagination page number.

page[size] integer

Number of items to return on each paginated page.

Request Example
GET /events?filter[customer_id]=x4xCwxxJxGCx123Rx5xTx&page[number]=1&page[size]=1
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/vnd.api+json
Response Example
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
"data": [
{
"attributes": {
"admin": false,
"created_at": "2016-06-06T20:05:10Z",
"customer_id": "x4xCwxxJxGCx123Rx5xTx",
"description": "Version 2 was activated",
"event_type": "version.activate",
"ip": "127.0.0.0",
"metadata": {
"version_number": 2
},
"service_id": "SU1Z0isxPaozGVKXdv0eY",
"user_id": "4Pp0BW3UkBEJhG3N0kovLP"
},
"id": "5IH1QmNSV1Qi7jXc4oIZlZ",
"type": "event"
}
],
"links": {
"last": "http://api.fastly.com/events?filter[customer_id]=x4xCwxxJxGCx123Rx5xTx&page[number]=1&page[size]=1"
}
}
GET /events/event_id

Get a specific event

Authentication

API token.

Parameters
parameter type description
event_id string

The event ID.

Request Example
GET /events/1PTzLK8g1NRKMGu5kUb8SC
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/vnd.api+json
Response Example
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
"data": {
"attributes": {
"admin": false,
"created_at": "2016-06-01T21:29:38Z",
"customer_id": "x4xCwxxJxGCx123Rx5xTx",
"description": "Version 2 was activated",
"event_type": "version.activate",
"ip": "127.0.0.0",
"metadata": {
"version_number": 2
},
"service_id": "SU1Z0isxPaozGVKXdv0eY",
"user_id": "6MwX4ZZM7Ji4Q3O07dI8Ln"
},
"id": "1PTzLK8g1NRKMGu5kUb8SC",
"type": "event"
}
}

Billing

Get information on current and past bills.


Fields

field type description
end_time string

The end date of this invoice.

invoice_id string

The alphanumeric string identifying the specified invoice.

start_time string

The start date of this invoice.

status.sent_at string

(Deprecated) When the invoice was sent out (Outstanding or Paid).

status.status string

What the current status of this invoice can be. One of Pending (being generated), Outstanding (unpaid), Paid (paid), Month to date (the current month).

total.bandwidth integer

The total amount of bandwidth used this month (See bandwidth_units for measurement).

total.bandwidth_cost integer

The cost of the bandwidth used this month in USD.

total.bandwidth_units string

Bandwidth measurement units based on billing plan. Ex: GB

total.cost integer

The final amount to be paid.

total.cost_before_discount integer

Total incurred cost plus extras cost.

total.discount integer

Calculated discount rate.

total.extras string

A list of any extras for this invoice.

total.extras_cost integer

Total cost of all extras.

total.extras.name string

The name of this extra cost.

total.extras.recurring integer

Recurring monthly cost in USD (not present if $0.0).

total.extras.setup integer

Initial set up cost in USD (not present if $0.0 or this is not the month the extra was added).

total.incurred_cost integer

The total cost of bandwidth and requests used this month.

total.overage integer

How much over the plan minimum has been incurred.

total.plan_code string

The short code the plan this invoice was generated under.

total.plan_minimum integer

The minimum cost of this plan.

total.plan_name string

The name of the plan this invoice was generated under.

total.requests integer

The total number of requests used this month.

total.requests_cost integer

The cost of the requests used this month.

total.terms string

Payment terms. Almost always Net15.

Actions

GET /billing/year/year/month/month

Get the invoice for a given year and month.

Authentication

API token of a user with at least Billing permissions.

Parameters
parameter type description
month integer

2-digit month.

year integer

4-digit year.

Request Example
GET /billing/year/2012/month/01
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
"end_time": "2016-05-31T23:59:59Z",
"invoice_id": "4ecwvWr9TQplD9tSzdnMfC",
"regions": {
"asia": {
"bandwidth": {
"tiers": [
{
"name": "first 10TB",
"price": 0.19,
"total": 0.0,
"units": 0.0
}
],
"total": 0.0
},
"cost": 0.0,
"requests": {
"tiers": [
{
"name": "per 10,000 HTTP requests",
"price": 0.009,
"total": 0.0,
"units": 0.0
},
{
"name": "per 10,000 HTTPS requests",
"price": 0.012,
"total": 0.0,
"units": 0.0
}
],
"total": 0.0
}
},
"australia": {
"bandwidth": {
"tiers": [
{
"name": "first 10TB",
"price": 0.19,
"total": 0.0,
"units": 0.0
}
],
"total": 0.0
},
"cost": 0.0,
"requests": {
"tiers": [
{
"name": "per 10,000 HTTP requests",
"price": 0.009,
"total": 0.0,
"units": 0.0
},
{
"name": "per 10,000 HTTPS requests",
"price": 0.0125,
"total": 0.0,
"units": 0.0
}
],
"total": 0.0
}
},
"europe": {
"bandwidth": {
"tiers": [
{
"name": "first 10TB",
"price": 0.12,
"total": 6.537884473800659e-07,
"units": 5.448237061500549e-06
}
],
"total": 6.537884473800659e-07
},
"cost": 6.053788447380065e-06,
"requests": {
"tiers": [
{
"name": "per 10,000 HTTP requests",
"price": 0.009,
"total": 5.399999999999999e-06,
"units": 0.0006
},
{
"name": "per 10,000 HTTPS requests",
"price": 0.012,
"total": 0.0,
"units": 0.0
}
],
"total": 5.399999999999999e-06
}
},
"latam": {
"bandwidth": {
"tiers": [
{
"name": "first 10TB",
"price": 0.28,
"total": 0.0,
"units": 0.0
}
],
"total": 0.0
},
"cost": 0.0,
"requests": {
"tiers": [
{
"name": "per 10,000 HTTP requests",
"price": 0.016,
"total": 0.0,
"units": 0.0
},
{
"name": "per 10,000 HTTPS requests",
"price": 0.016,
"total": 0.0,
"units": 0.0
}
],
"total": 0.0
}
},
"usa": {
"bandwidth": {
"tiers": [
{
"name": "first 10TB",
"price": 0.12,
"total": 3.197416663169861e-05,
"units": 0.0002664513885974884
}
],
"total": 3.197416663169861e-05
},
"cost": 7.69741666316986e-05,
"requests": {
"tiers": [
{
"name": "per 10,000 HTTP requests",
"price": 0.0075,
"total": 4.4999999999999996e-05,
"units": 0.006
},
{
"name": "per 10,000 HTTPS requests",
"price": 0.01,
"total": 0.0,
"units": 0.0
}
],
"total": 4.4999999999999996e-05
}
}
},
"services": {
"2LrVBc3muQ92X2a0ZT083Z": {
"asia": {
"bandwidth": 0.0,
"requests": 0.0,
"ssl_requests": 0.0
},
"australia": {
"bandwidth": 0.0,
"requests": 0.0,
"ssl_requests": 0.0
},
"europe": {
"bandwidth": 5.448237061500549e-06,
"requests": 6.0,
"ssl_requests": 0.0
},
"latam": {
"bandwidth": 0.0,
"requests": 0.0,
"ssl_requests": 0.0
},
"name": "Example Service Name",
"usa": {
"bandwidth": 4.7101639211177826e-05,
"requests": 52.0,
"ssl_requests": 0.0
}
},
},
"start_time": "2016-05-01T00:00:00Z",
"status": {
"invoice_id": "4ecwvWr9TQplD9tSzdnMfC",
"sent_at": "2016-06-02T20:10:21+00:00",
"status": "Outstanding"
},
"total": {
"bandwidth": 0.00027189962565898895,
"bandwidth_cost": 3.2627955079078674e-05,
"bandwidth_units": "GB",
"cost": 0.0,
"cost_before_discount": 8.302795507907867e-05,
"discount": 100.0,
"extras": [],
"extras_cost": 0.0,
"incurred_cost": 8.302795507907867e-05,
"plan_code": "developer",
"plan_minimum": 0.0,
"plan_name": "developer",
"requests": 66.0,
"requests_cost": 5.039999999999999e-05,
"terms": "Net15"
}

Billing Address

A billing address is used to calculate your bill correctly.


Fields

field type description
address_1 string

The first address line

address_2 string

The second address line

city string

The city name

state string

The state name

locality string

Other locality

country string

ISO 3166-1 two-letter country code

postal_code string

Postal code (ZIP code for US addresses)

Actions

GET /customer/customer_id/billing_address

Get a customer's billing address

Authentication

API token with at least Billing permissions.

Parameters
parameter type description
customer_id string

The Customer ID.

Request Example
GET /customer/CUSTOMER_ID/billing_address
Content-Type: application/vnd.api+json
Response Example
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
"data": {
"id": "3DTWpamEUGISvrUiDWkesQ",
"type": "billing_address",
"attributes": {
"address_1": "80719 Dorothea Mountain",
"address_2": "Apt. 652",
"city": "New Rasheedville",
"country": "US",
"created_at": "2016-06-09T18:14:30+00:00",
"locality": "",
"postal_code": "53538-5902",
"state": "DE",
"updated_at": "2016-06-09T18:14:30+00:00"
},
"relationships": {
"customer": {
"data": {
"type": "customer",
"id": "x4xCwxxJxGCx123Rx5xTx"
}
}
}
}
}
POST /customer/customer_id/billing_address

Add a billing address for a customer

Authentication

API token with at least Billing permissions.

Parameters
parameter type description
customer_id string

The Customer ID.

Request Example
POST /customer/CUSTOMER_ID/billing_address
Content-Type: application/vnd.api+json
{
"data": {
"type": "billing_address",
"address": {
"address_1": "80719 Dorothea Mountain",
"address_2": "Apt. 652",
"city": "New Rasheedville",
"state": "DE",
"country": "US",
"postal_code": "53538-5902",
}
}
}
Response Example
HTTP/1.1 201 Created
Content-Type: application/vnd.api+json
{
"data": {
"type": "billing_address",
"id": "BILLING_ADDRESS_ID",
"address": {
"address_1": "80719 Dorothea Mountain",
"address_2": "Apt. 652",
"city": "New Rasheedville",
"state": "DE",
"country": "US",
"postal_code": "53538-5902",
},
"relationships": {
"customer": {
"data": {
"type": "customer",
"id": "x4xCwxxJxGCx123Rx5xTx"
}
}
}
}
}
PATCH /customer/customer_id/billing_address

Update a customer's billing address

Authentication

API token with at least Billing permissions.

Parameters
parameter type description
customer_id string

The Customer ID.

Request Example
PATCH /customer/CUSTOMER_ID/billing_address
Content-Type: application/vnd.api+json
{
"data": {
"type": "billing_address",
"id": "BILLING_ADDRESS_ID",
"address": {
"state": "MN",
}
}
}
Response Example
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
"data": {
"type": "billing_address",
"id": "BILLING_ADDRESS_ID",
"address": {
"address_1": "80719 Dorothea Mountain",
"address_2": "Apt. 652",
"city": "New Rasheedville",
"state": "MN",
"country": "US",
"postal_code": "53538-5902",
},
"relationships": {
"customer": {
"data": {
"type": "customer",
"id": "x4xCwxxJxGCx123Rx5xTx"
}
}
}
}
}
DELETE /customer/customer_id/billing_address

Delete a customer's billing address

Authentication

API token with at least Billing permissions.

Parameters
parameter type description
customer_id string

The Customer ID.

Request Example
DELETE /customer/CUSTOMER_ID/billing_address
Content-Type: application/vnd.api+json
Response Example
HTTP/1.1 204 No Content
Content-Type: application/vnd.api+json

Customer

A Customer is the base object which owns your Users and Services


Fields

field type description
billing_contact_id string

The alphanumeric string representing the primary billing contact.

billing_network_type string

Customer's current network revenue type. Can be Public or Private.

billing_ref string

Used for adding purchased orders to customer's account.

can_configure_wordpress boolean

Whether this customer can view or edit wordpress. Read Only.

can_reset_passwords boolean

Whether this customer can reset passwords. Read Only.

can_upload_vcl boolean

Whether this customer can upload VCL. Read Only.

created_at string

Time-stamp (GMT) when the user or customer was created.

deleted_at string

Time-stamp (GMT) when the user or customer was deleted.

email_hash string

The alphanumeric string identifying the user's email login.

force_2fa boolean

Specifies whether 2fa is forced or not forced on the customer account.

has_account_panel boolean

Specifies whether the account has access or does not have access to the account panel.

has_improved_events boolean

Specifies whether the account has access or does not have access to the improved events.

has_improved_ssl_config boolean

Whether this customer can view or edit the ssl config. Read Only.

has_openstack_logging boolean

Specifies whether the account has enabled or not enabled openstack logging.

has_pci boolean

Specifies whether the account can edit PCI for a service.

has_pci_passwords boolean

Specifies whether PCI passwords are required for the account. Read only.

id string

The alphanumeric string identifying the customer.

ip_whitelist string

The range of IP addresses authorized to access the customer account.

login string

The email used to login to Fastly.

name string

The name of the customer, generally the company name.

owner_id string

The alphanumeric string identifying the account owner.

phone_number string

The phone number associated with the account.

postal_address string

The potal address associated with the account.

pricing_plan string

The pricing plan this customer is under.

pricing_plan_id string

The alphanumeric string identifying the pricing plan.

readonly boolean
require_new_password boolean

Specifies whether a new passoword is required or not required at next login.

requires_support_email boolean
role string

The designated role or permissions for the user. Can be Billing, Engineer, User, and Super User.

two_factor_auth_enabled boolean

Specifies whether 2fa is enabled or not enabled on the account.

two_factor_setup_required boolean

Specifies whether 2fa is required for the user account.

updated_at string

Time-stamp (GMT) when the user or customer was updated.

Actions

GET /customer/id/users

List all users from a specified customer id

Authentication

API token.

Request Example
get /customer/4mp6jxt8Z5b4be5jIhXz0O/users
Content-Type: application/x-www-form-urlencoded
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"created_at": "2016-05-02T17:15:54+00:00",
"customer_id": "x4xCwxxJxGCx123Rx5xTx",
"deleted_at": null,
"email_hash": "hTE5dRlSBICGPJxJwCH4M",
"id": "x9KzsrACXZv8tPwlEDsKb6",
"locked": false,
"login": "johnowner@example.com",
"name": "John Owner",
"require_new_password": false,
"role": "user",
"two_factor_auth_enabled": true,
"two_factor_setup_required": false,
"updated_at": "2016-05-21T18:45:00+00:00"
},
]
GET /current_customer

Get the logged in customer

Authentication

API token.

Request Example
GET /current_customer
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
"billing_contact_id": null,
"billing_network_type": "public",
"billing_ref": null,
"can_configure_wordpress": null,
"can_reset_passwords": true,
"can_upload_vcl": true,
"created_at": "2011-09-19T19:59:16+00:00",
"deleted_at": null,
"force_2fa": true,
"has_account_panel": true,
"has_improved_events": false,
"has_improved_ssl_config": true,
"has_openstack_logging": true,
"has_pci": false,
"has_pci_passwords": true,
"id": "hTE5dRlSBICGPJxJwCH4M",
"ip_whitelist": "0.0.0.0/0",
"name": "Test Account",
"owner_id": "x9KzsrACXZv8tPwlEDsKb6",
"phone_number": "5555555559",
"postal_address": "",
"pricing_plan": "customer",
"pricing_plan_id": "5PMLv2VdXE8xNbMCm9xayC",
"readonly": false,
"requires_support_email": false,
"updated_at": "2016-04-07T17:21:06+00:00",
}
GET /customer/id

Get a specific customer

Authentication

API token.

Request Example
GET /customer/hTE5dRlSBICGPJxJwCH4M
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
"billing_contact_id": null,
"billing_network_type": "public",
"billing_ref": null,
"can_configure_wordpress": false,
"can_reset_passwords": true,
"can_upload_vcl": false,
"created_at": "2016-06-14T14:43:01+00:00",
"deleted_at": null,
"force_2fa": false,
"has_account_panel": true,
"has_improved_events": false,
"has_improved_ssl_config": false,
"has_openstack_logging": false,
"has_pci": false,
"has_pci_passwords": false,
"id": "hTE5dRlSBICGPJxJwCH4M",
"ip_whitelist": "0.0.0.0/0",
"name": "Test Account",
"owner_id": "x9KzsrACXZv8tPwlEDsKb6",
"phone_number": "5555555559",
"postal_address": null,
"pricing_plan": "developer",
"pricing_plan_id": "6HW4welznAHVnMCJhY9QdX",
"readonly": false,
"requires_support_email": false,
"updated_at": "2016-06-14T14:43:01+00:00",
}
PUT /customer/id

Update a customer

Authentication

API token.

Request Example
PUT /customer/4mp6jxt8Z5b4be5jIhXz0O
Content-Type: application/x-www-form-urlencoded
name=updated-test-account
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
"billing_contact_id": null,
"billing_network_type": "public",
"billing_ref": null,
"can_configure_wordpress": false,
"can_reset_passwords": true,
"can_upload_vcl": false,
"created_at": "2016-06-14T14:43:01+00:00",
"deleted_at": null,
"force_2fa": false,
"has_account_panel": true,
"has_improved_events": false,
"has_improved_ssl_config": false,
"has_openstack_logging": false,
"has_pci": false,
"has_pci_passwords": false,
"id": "hTE5dRlSBICGPJxJwCH4M",
"ip_whitelist": "0.0.0.0/0",
"name": "updated-test-account",
"owner_id": "x9KzsrACXZv8tPwlEDsKb6",
"phone_number": "5555555559",
"postal_address": null,
"pricing_plan": "developer",
"pricing_plan_id": "6HW4welznAHVnMCJhY9QdX",
"readonly": false,
"requires_support_email": false,
"updated_at": "2016-06-14T14:43:01+00:00",
}
DELETE /customer/id

Delete a customer

Authentication

API token.

Request Example
DELETE /customer/4mp6jxt8Z5b4be5jIhXz0O
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
"status":"ok"
}

Event Log

EventLogs keep track of things that occur within your services or organization. We track events such as activation and deactivation of Versions and mass purges.


Fields

field type description
details string

A more verbose explanation of the event.

level integer

Defines how serious the event is. Lower is more serious.

message string

A brief string explaining the event.

object_type string

The type of object this message is for. (Ex: service, user, etc.)

ref_id string

The id of the object to which this log message applies.

subsystem string

Unused.

system string

Unused.

timestamp integer

A Unix timestamp of when the event occurred.

Actions

GET /event_log/id

Get the specified event log

Authentication

API token of a user with at least Engineer permissions.

Parameters
parameter type description
limit integer

Raise or lower number of items returned. (default 20)

after integer

Offset response (default 0)

Request Example
GET /event_log/SU1Z0isxPaozGVKXdv0eY
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"details": "",
"level": 5,
"message": "Activated version 2",
"object_type": "service",
"ref_id": "SU1Z0isxPaozGVKXdv0eY",
"subsystem": "",
"system": "",
"timestamp": 1339713014104
},
]

Invitation

The invitations are created by the customer in order to invite employees to create user accounts that operate under the main customer account.


Fields

field type description
created_at string

Time-stamp (GMT) when the invitation was created.

customer_id string

The alphanumeric string identifying a customer.

email string

The email address of the invitee.

id string

The alphanumeric string identifying an invitation.

role string

The user-assigned permissions role. Can be user, billing, engineer, or superuser.

status_code. boolean

Indicates whether or not the invite is active, with 0 representing inactive while 1 represents active.

updated_at string

Time-stamp (GMT) when the invitation was updated.

Actions

GET /invitation

Get all open invitations created by the customer

Authentication

API token with at least Billing permissions.

Request Example
GET /invitation
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
"open_invitations": [
{
"created_at": "2016-06-16T20:23:28+00:00",
"customer_id": "43BKzOa3waLyxYPmikcaEo",
"email": "john@example.com",
"id": "3Vyk3UNZCncwYaZhwjbo8A",
"role": "superuser",
"status_code": 1,
"updated_at": "2016-06-16T20:23:28+00:00"
}
],
"permissible_roles": [
"superuser",
"engineer",
"billing",
"user"
]
}
POST /invitation

Create a new invitation and email it to the recipient.

Authentication

API token with at least Billing permissions.

Request Example
POST /invitation
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
email=john@example.com
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
"created_at": "2016-06-16T20:26:58+00:00",
"customer_id": "43BKzOa3waLyxYPmikcaEo",
"email": "john@example.com",
"id": "481ZGvT2i5xIBi9LnEANzn",
"role": "user",
"status_code": 1,
"updated_at": "2016-06-16T20:26:58+00:00"
}
PUT /invitation/id/cancel

Cancel an open invitation

Authentication

API token with at least Billing permissions.

Request Example
PUT /invitation/:id/cancel
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
"created_at": "2016-06-16T20:28:42+00:00",
"customer_id": "43BKzOa3waLyxYPmikcaEo",
"email": "john@example.com",
"id": "27glbTu8TI6O4fbnd2o6Uc",
"role": "user",
"status_code": 0,
"updated_at": "2016-06-16T20:29:08+00:00"
}

Pricing Extras

An object describing various extras that get added to your bill at the end of the month. This object is deprecated.


Fields

field type description
active_at string

Time-stamp (GMT) when the extra became active.

active_time string

Unused.

active_until string

Time-stamp (GMT) when the extra was became inactive.

comment string
created_at string

Time-stamp (GMT) when the extra was created.

customer_id string

The alphanumeric string identifying the customer.

deleted_at string

Time-stamp (GMT) when the extra was deleted.

expires_at string

Time-stamp (GMT) when the extra expires.

id string

The alphanumeric string indentifying the pricing extra.

name string

The unique name of the pricing extra

netsuite_inventory_item_id string

Unused.

recurring integer

The recurring cost of the pricing extra, charged every month.

setup integer

The setup cost of the pricing extra, only charged the month it was created.

Actions

GET /customer/customer_id/pricing_extra

Get all the pricing extras for a customer. This call is deprecated.

Authentication

API token.

Parameters
parameter type description
customer_id string

The customer ID.

Request Example
GET /customer/hTE5dRlSBICGPJxJwCH4M/pricing_extra
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
"active_at": "2015-11-01T00:00:00+00:00",
"active_time": "2015-11-01T00:00:00+00:00",
"active_until": null,
"comment": "",
"created_at": "2015-12-01T18:53:52+00:00",
"customer_id": "x4xCwxxJxGCx123Rx5xTx",
"deleted_at": null,
"expires_at": null,
"id": "1cLb6ZDgCnQK5hwu1lJ2xI",
"name": "Wildcard SAN SSL Certificate *.example.com",
"netsuite_inventory_item_id": "5VNJH6Ys1x8XtbLS8UW7iT",
"recurring": "275.0",
"setup": "0.0"
},
GET /customer/customer_id/pricing_extra/name

Get an individual pricing extra for a customer

Authentication

API token.

Parameters
parameter type description
customer_id string

The customer ID.

Request Example
GET /customer/hTE5dRlSBICGPJxJwCH4M/pricing_extra/SSL
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
"active_at": "2016-04-07T00:00:00+00:00",
"active_time": "2016-04-07T00:00:00+00:00",
"active_until": null,
"comment": "",
"created_at": "2016-05-02T17:15:27+00:00",
"customer_id": "x4xCwxxJxGCx123Rx5xTx",
"deleted_at": null,
"expires_at": null,
"id": "1ZWMDbMZPqS1XJw0cttK9n",
"name": "SSL",
"netsuite_inventory_item_id": "5VNJH6Ys1x8XtbLS8UW7iT",
"recurring": "100.0",
"setup": "0.0"

User

A user of the Fastly API and web interface. A user is always associated with a customer.


Fields

field type description
created_at string

Time-stamp (GMT) when the user was created.

customer_id string

The alphanumeric string identifying a customer.

deleted_at string

Time-stamp (GMT) when the user was deleted.

email_hash string

The alphanumeric string indentifying a email login.

id string

The alphanumeric string indefiying a user.

locked boolean

Indicates whether the is account is locked for editing or not.

login string

The email address, which is the login name, of this user.

name string

The real life name of the user.

require_new_password boolean

Indicates if a new password is required at next login.

role string

The role of this user.

two_factor_auth_enabled boolean

Indicates if 2fa is enabled on the user.

two_factor_setup_required boolean

Indicates if 2fa is required by the user's customer account.

updated_at string

Time-stamp (GMT) when the user was updated.

Actions

GET /current_user

Get the logged in user

Authentication

API token with at least Billing permissions.

Request Example
GET /current_user
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
"created_at": "2016-06-14T14:43:01+00:00",
"customer_id": "x4xCwxxJxGCx123Rx5xTx",
"deleted_at": null,
"email_hash": "xe8x2dxffx5bx18123x69x3fxefxefxa",
"id": "6c7kAlo4vACNchGOdQxP37",
"locked": false,
"login": "johnowner@example.com",
"name": "John Owner",
"require_new_password": false,
"role": "user",
"two_factor_auth_enabled": false,
"two_factor_setup_required": false,
"updated_at": "2016-06-20T16:45:18+00:00"
}
GET /user/id

Get a specific user

Authentication

API token with at least Billing permissions.

Request Example
GET /user/x9KzsrACXZv8tPwlEDsKb6
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
"created_at": "2016-06-14T14:43:01+00:00",
"customer_id": "x4xCwxxJxGCx123Rx5xTx",
"deleted_at": null,
"email_hash": "xe8x2dxffx5bx18123x69x3fxefxefxa",
"id": "6c7kAlo4vACNchGOdQxP37",
"locked": false,
"login": "johnowner@example.com",
"name": "John Owner",
"require_new_password": false,
"role": "user",
"two_factor_auth_enabled": false,
"two_factor_setup_required": false,
"updated_at": "2016-06-20T16:45:18+00:00"
}
POST /user

Create a user

Authentication

API token with at least Billing permissions.

Request Example
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=John Owner&login=johnowner%40example.com
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
"created_at": "2016-06-14T14:43:01+00:00",
"customer_id": "x4xCwxxJxGCx123Rx5xTx",
"deleted_at": null,
"email_hash": "xe8x2dxffx5bx18123x69x3fxefxefxa",
"id": "6c7kAlo4vACNchGOdQxP37",
"locked": false,
"login": "johnowner@example.com",
"name": "John Owner",
"require_new_password": false,
"role": "user",
"two_factor_auth_enabled": false,
"two_factor_setup_required": false,
"updated_at": "2016-06-20T16:45:18+00:00"
}
POST /current_user/password

Update the user's password to a new one

Authentication

Username and password

Request Example
POST /current_user/password/newpwd
old_password=oldpasswd&new_password=newpwd
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
"created_at": "2016-06-14T14:43:01+00:00",
"customer_id": "x4xCwxxJxGCx123Rx5xTx",
"deleted_at": null,
"email_hash": "xe8x2dxffx5bx18123x69x3fxefxefxa",
"id": "6c7kAlo4vACNchGOdQxP37",
"locked": false,
"login": "johnowner@example.com",
"name": "John Owner",
"require_new_password": false,
"role": "user",
"two_factor_auth_enabled": false,
"two_factor_setup_required": false,
"updated_at": "2016-06-20T16:45:18+00:00"
}
POST /user/login/password/request_reset

Requests a password reset for the specified user

Authentication

none

Request Example
POST /user/x9KzsrACXZv8tPwlEDsKb6/password/request_reset
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
"status":"ok"
}
PUT /user/id

Update a user

Authentication

API token with at least Billing permissions.

Request Example
PUT /user/x9KzsrACXZv8tPwlEDsKb6
Fastly-Key: YOUR_FASTLY_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/json
name=Updated Name
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
"created_at": "2016-06-14T14:43:01+00:00",
"customer_id": "x4xCwxxJxGCx123Rx5xTx",
"deleted_at": null,
"email_hash": "xe8x2dxffx5bx18123x69x3fxefxefxa",
"id": "6c7kAlo4vACNchGOdQxP37",
"locked": false,
"login": "johnowner@example.com",
"name": "Updated Name",
"require_new_password": false,
"role": "user",
"two_factor_auth_enabled": false,
"two_factor_setup_required": false,
"updated_at": "2016-06-20T16:45:18+00:00"
}
DELETE /user/id

Delete a user

Authentication

API token with at least Billing permissions.

Request Example
DELETE /user/x9KzsrACXZv8tPwlEDsKb6
Fastly-Key: YOUR_FASTLY_TOKEN
Accept: application/json
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
"status":"ok"
}