Websites API

A website groups your forms. Read your websites, and on a Platinum plan create, change and delete them and set their logo. New to the API? Start with the overview.

The list includes the websites other people shared with you. Every other call here only works on websites you own.

List Websites

GET /api/v1/websites Bronze Plan

Returns the websites you own and the websites that are shared with you.

curl "https://kwesforms.com/api/v1/websites" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
[
  {
    "id": 13,
    "owner_id": 4,
    "name": "My Favorite Website",
    "allowed_domains": ["myfavoritewebsite.com"],
    "domain": "https://myfavoritewebsite.com",
    "test_domain": null,
    "created_at": "2026-11-23T18:47:35.000000Z",
    "updated_at": "2026-11-23T18:47:35.000000Z",
    "is_owner": true,
    "role": "owner"
  }
]

role is owner for your own websites. For a shared one it is read_write when you can view and edit its submissions, or read when you can only view them, and is_owner is false.

Get a Website

GET /api/v1/websites/{website} Bronze Plan

Returns one of your websites. logo is the address of its logo, or null when it has none.

Parameter In Type Required Description
website path integer Yes The website's ID.
curl "https://kwesforms.com/api/v1/websites/13" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
{
  "id": 13,
  "owner_id": 4,
  "name": "My Favorite Website",
  "allowed_domains": ["myfavoritewebsite.com"],
  "domain": "https://myfavoritewebsite.com",
  "test_domain": null,
  "created_at": "2026-11-23T18:47:35.000000Z",
  "updated_at": "2026-11-23T18:47:35.000000Z",
  "logo": null
}

Create a Website

POST /api/v1/websites Platinum Plan

Creates a website, and can share it with other people at the same time.

Parameter In Type Required Description
name body string Yes The website's name. At most 191 characters.
allowed_domains body array No The domains submissions may come from, for example ["myfavoritewebsite.com"]. On a form with spam filters on, a submission from another domain is treated as spam. Without it every domain is allowed. Each domain is at most 255 characters.
domain body string No The website's address, starting with https:// or http://. At most 191 characters.
test_domain body string No The address of its test or staging site. At most 191 characters.
users body array No The people to share the website with, one object per person.
users[].email body string Yes The person's email address. At most 191 characters.
users[].permission body string No read to view submissions, or read_write to view and edit them. Default read.
curl -X POST "https://kwesforms.com/api/v1/websites" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Favorite Website",
    "allowed_domains": ["myfavoritewebsite.com"],
    "domain": "https://myfavoritewebsite.com",
    "users": [
      { "email": "jane@agency.com", "permission": "read_write" },
      { "email": "sam@agency.com" }
    ]
  }'
{
  "id": 13,
  "owner_id": 4,
  "name": "My Favorite Website",
  "allowed_domains": ["myfavoritewebsite.com"],
  "domain": "https://myfavoritewebsite.com",
  "created_at": "2026-11-23T18:47:35.000000Z",
  "updated_at": "2026-11-23T18:47:35.000000Z",
  "logo": null,
  "users": [
    { "email": "jane@agency.com", "permission": "read_write", "invited": false },
    { "email": "sam@agency.com", "permission": "read", "invited": true }
  ]
}

users in the reply says what happened to each person:

  • "invited": true: they had no KwesForms account, so they were sent an invitation.
  • "invited": false: they already had an account and were added to the website.
  • An error of Not added: you reached your limit for users.: your plan allows no more people. The website is still created.
  • Your own email address and addresses listed twice are skipped, and are not in the reply.

People can only be added when the website is created. To add, change or remove them later, use your dashboard.

Status Message Why
422 You reached your limit for websites. Your plan allows no more websites.

Update a Website

PATCH /api/v1/websites/{website} Platinum Plan

Changes a website's settings. Send only the settings you want to change: the ones you leave out stay as they are.

Parameter In Type Required Description
website path integer Yes The website's ID.
name body string No The website's name. At most 191 characters. null leaves it as it is.
allowed_domains body array No The domains submissions may come from. It replaces the list the website has. Each domain is at most 255 characters. null or an empty list allows every domain again.
domain body string No The website's address. At most 191 characters. null removes it.
test_domain body string No The address of its test or staging site. At most 191 characters. null removes it.
curl -X PATCH "https://kwesforms.com/api/v1/websites/13" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "A New Website Name",
    "allowed_domains": ["myfavoritewebsite.com", "shop.myfavoritewebsite.com"]
  }'
{
  "id": 13,
  "owner_id": 4,
  "name": "A New Website Name",
  "allowed_domains": ["myfavoritewebsite.com", "shop.myfavoritewebsite.com"],
  "domain": "https://myfavoritewebsite.com",
  "test_domain": null,
  "created_at": "2026-11-23T18:47:35.000000Z",
  "updated_at": "2026-11-23T19:02:11.000000Z",
  "logo": null
}

Delete a Website

DELETE /api/v1/websites/{website} Platinum Plan

Deletes a website together with its logo and all of its forms, including their submissions, uploaded files, emails and integrations. This cannot be undone.

Parameter In Type Required Description
website path integer Yes The website's ID.
curl -X DELETE "https://kwesforms.com/api/v1/websites/13" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
{
  "message": "You have successfully deleted the website."
}

POST /api/v1/websites/{website}/logo Platinum Plan

Sets the logo that your emails show, replacing the one the website has. Send the image as a file upload, not as JSON.

Parameter In Type Required Description
website path integer Yes The website's ID.
logo body file Yes An image of at most 500 KB. Use a PNG, JPG or GIF.
curl -X POST "https://kwesforms.com/api/v1/websites/13/logo" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -F "logo=@logo.png"
{
  "id": 13,
  "owner_id": 4,
  "name": "My Favorite Website",
  "allowed_domains": ["myfavoritewebsite.com"],
  "domain": "https://myfavoritewebsite.com",
  "test_domain": null,
  "created_at": "2026-11-23T18:47:35.000000Z",
  "updated_at": "2026-11-23T18:47:35.000000Z",
  "logo": "https://.../websites/13/logo.png"
}

DELETE /api/v1/websites/{website}/logo Platinum Plan

Removes the website's logo. The reply is the website with logo set to null.

Parameter In Type Required Description
website path integer Yes The website's ID.
curl -X DELETE "https://kwesforms.com/api/v1/websites/13/logo" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

Notice anything wrong in our docs? Let us know.