Forms
Revoke the public token
Removes the form’s public token. The share link, the embed code, and the public token-addressed operations stop working for this form at once. Generate a new token to share the form again. The form’s status doesn’t change.
DELETE
/
api
/
forms
/
{id}
/
revoke_token
Revoke the public token
curl --request DELETE \
--url https://api.fluid.app/api/forms/{id}/revoke_token \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fluid.app/api/forms/{id}/revoke_token"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fluid.app/api/forms/{id}/revoke_token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fluid.app/api/forms/{id}/revoke_token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/forms/{id}/revoke_token"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.fluid.app/api/forms/{id}/revoke_token")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/forms/{id}/revoke_token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"form": {
"countries": [
"<string>"
],
"description": "<string>",
"embed_settings": {
"password_protected": true
},
"embed_url": null,
"form_components": null,
"form_redirect": null,
"form_respondents_count": 123,
"form_styles": null,
"form_type": null,
"id": 123,
"public_token": null,
"share_url": null,
"status": "<string>",
"title": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
},
"message": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}Authorizations
Bearer token authentication
Path Parameters
ID of the form.
⌘I
Revoke the public token
curl --request DELETE \
--url https://api.fluid.app/api/forms/{id}/revoke_token \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fluid.app/api/forms/{id}/revoke_token"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fluid.app/api/forms/{id}/revoke_token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fluid.app/api/forms/{id}/revoke_token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/forms/{id}/revoke_token"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.fluid.app/api/forms/{id}/revoke_token")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/forms/{id}/revoke_token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"form": {
"countries": [
"<string>"
],
"description": "<string>",
"embed_settings": {
"password_protected": true
},
"embed_url": null,
"form_components": null,
"form_redirect": null,
"form_respondents_count": 123,
"form_styles": null,
"form_type": null,
"id": 123,
"public_token": null,
"share_url": null,
"status": "<string>",
"title": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
},
"message": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}