Dynamic URLs
Creates a Dynamic URL
POST /api/dynamic-url/create
https://api.cookie-api.com/api/dynamic-url/create
Authentication Learn how to get your API Key and use it in your requests!
{ "url": "the target of your Dynamic URL"}
curl --location 'https://api.cookie-api.com/api/dynamic-url/create' \--header 'Authorization: API Key' \--data '{ "url": "https://docs.cookie-api.com"}'
import requests
url = 'https://api.cookie-api.com/api/dynamic-url/create'headers = { 'Authorization': 'API Key'}data = { 'url': 'https://docs.cookie-api.com'}
response = requests.post(url, headers=headers, json=data)print(response.json())
const fetch = require('node-fetch');
const url = 'https://api.cookie-api.com/api/dynamic-url/create';const headers = { 'Authorization': 'API Key', 'Content-Type': 'application/json'};const data = { url: 'https://docs.cookie-api.com'};
fetch(url, { method: 'POST', headers, body: JSON.stringify(data)}) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));
package main
import ( "bytes" "fmt" "log" "net/http" "encoding/json")
type RequestBody struct { URL string `json:"url"`}
func main() { url := "https://api.cookie-api.com/api/dynamic-url/create" requestBody := RequestBody{ URL: "https://docs.cookie-api.com", }
jsonData, err := json.Marshal(requestBody) if err != nil { log.Fatal(err) }
req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonData)) if err != nil { log.Fatal(err) }
req.Header.Set("Authorization", "API Key") req.Header.Set("Content-Type", "application/json")
client := &http.Client{} resp, err := client.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)}
const https = require('https');
const data = JSON.stringify({ url: 'https://docs.cookie-api.com'});
const options = { hostname: 'api.cookie-api.com', path: '/api/dynamic-url/create', method: 'POST', headers: { 'Authorization': 'API Key', 'Content-Type': 'application/json', 'Content-Length': data.length }};
const req = https.request(options, res => { let responseData = '';
res.on('data', chunk => { responseData += chunk; });
res.on('end', () => { console.log(JSON.parse(responseData)); });});
req.on('error', error => { console.error(error);});
req.write(data);req.end();
require 'net/http'require 'json'require 'uri'
url = URI.parse('https://api.cookie-api.com/api/dynamic-url/create')request = Net::HTTP::Post.new(url)request['Authorization'] = 'API Key'request['Content-Type'] = 'application/json'request.body = { url: 'https://docs.cookie-api.com' }.to_json
response = Net::HTTP.start(url.hostname, url.port) { |http| http.request(request) }
puts JSON.parse(response.body)
use reqwest::blocking::Client;use reqwest::header::HeaderMap;use serde::{Serialize, Deserialize};use serde_json::Value;
#[derive(Serialize)]struct RequestBody { url: String,}
fn main() { let url = "https://api.cookie-api.com/api/dynamic-url/create"; let request_body = RequestBody { url: "https://docs.cookie-api.com".to_string(), };
let client = Client::new(); let mut headers = HeaderMap::new(); headers.insert("Authorization", "API Key".parse().unwrap()); headers.insert("Content-Type", "application/json".parse().unwrap());
let res = client.post(url) .headers(headers) .json(&request_body) .send() .unwrap();
let body: Value = res.json().unwrap(); println!("{:?}", body);}
Responses
{ "changed": false, "success": true, "url": "https://api.cookie-api.com/s/8cpObLfL7pXel23bM096pgBCjEqbyr"}
Modify a Dynamic URL
Modifies an existing Dynamic URL
Only the Owner’s requests will be applied. Requests from non-owners will be ignored.
POST /api/dynamic-url/modify
https://api.cookie-api.com/api/dynamic-url/modify
Authentication Learn how to get your API Key and use it in your requests!
{ "url": "the target of your Dynamic URL", "target": "The new target of your Dynamic URL"}
curl --location 'https://api.cookie-api.com/api/dynamic-url/modify' \--header 'Authorization: API Key' \--data '{ "url": "https://api.cookie-api.com/s/zs4MKEAyy1zU5NGUf6xeakbRIGptOR", "target": "https://api.cookie-api.com"}'
import requests
url = 'https://api.cookie-api.com/api/dynamic-url/modify'headers = { 'Authorization': 'API Key'}data = { 'url': 'https://api.cookie-api.com/s/zs4MKEAyy1zU5NGUf6xeakbRIGptOR', 'target': 'https://api.cookie-api.com'}
response = requests.post(url, headers=headers, json=data)print(response.json())
const fetch = require('node-fetch');
const url = 'https://api.cookie-api.com/api/dynamic-url/modify';const headers = { 'Authorization': 'API Key', 'Content-Type': 'application/json'};const data = { url: 'https://api.cookie-api.com/s/zs4MKEAyy1zU5NGUf6xeakbRIGptOR', target: 'https://api.cookie-api.com'};
fetch(url, { method: 'POST', headers, body: JSON.stringify(data)}) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));
package main
import ( "bytes" "fmt" "log" "net/http" "encoding/json")
type RequestBody struct { URL string `json:"url"` Target string `json:"target"`}
func main() { url := "https://api.cookie-api.com/api/dynamic-url/modify" requestBody := RequestBody{ URL: "https://api.cookie-api.com/s/zs4MKEAyy1zU5NGUf6xeakbRIGptOR", Target: "https://api.cookie-api.com", }
jsonData, err := json.Marshal(requestBody) if err != nil { log.Fatal(err) }
req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonData)) if err != nil { log.Fatal(err) }
req.Header.Set("Authorization", "API Key") req.Header.Set("Content-Type", "application/json")
client := &http.Client{} resp, err := client.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)}
const https = require('https');
const data = JSON.stringify({ url: 'https://api.cookie-api.com/s/zs4MKEAyy1zU5NGUf6xeakbRIGptOR', target: 'https://api.cookie-api.com'});
const options = { hostname: 'api.cookie-api.com', path: '/api/dynamic-url/modify', method: 'POST', headers: { 'Authorization': 'API Key', 'Content-Type': 'application/json', 'Content-Length': data.length }};
const req = https.request(options, res => { let responseData = '';
res.on('data', chunk => { responseData += chunk; });
res.on('end', () => { console.log(JSON.parse(responseData)); });});
req.on('error', error => { console.error(error);});
req.write(data);req.end();
require 'net/http'require 'json'require 'uri'
url = URI.parse('https://api.cookie-api.com/api/dynamic-url/modify')request = Net::HTTP::Post.new(url)request['Authorization'] = 'API Key'request['Content-Type'] = 'application/json'request.body = { url: 'https://api.cookie-api.com/s/zs4MKEAyy1zU5NGUf6xeakbRIGptOR', target: 'https://api.cookie-api.com'}.to_json
response = Net::HTTP.start(url.hostname, url.port) { |http| http.request(request) }
puts JSON.parse(response.body)
use reqwest::blocking::Client;use reqwest::header::HeaderMap;use serde::{Serialize, Deserialize};use serde_json::Value;
#[derive(Serialize)]struct RequestBody { url: String, target: String,}
fn main() { let url = "https://api.cookie-api.com/api/dynamic-url/modify"; let request_body = RequestBody { url: "https://api.cookie-api.com/s/zs4MKEAyy1zU5NGUf6xeakbRIGptOR".to_string(), target: "https://api.cookie-api.com".to_string(), };
let client = Client::new(); let mut headers = HeaderMap::new(); headers.insert("Authorization", "API Key".parse().unwrap()); headers.insert("Content-Type", "application/json".parse().unwrap());
let res = client.post(url) .headers(headers) .json(&request_body) .send() .unwrap();
let body: Value = res.json().unwrap(); println!("{:?}", body);}
Responses
{ "message": "Dynamic URL was successfully modified.", "success": true}
View a Dynamic URL
Returns Information about a Dynamic URL
Only the Owner of the Dynamic URL can view Information about it.
GET /api/dynamic-url/view
https://api.cookie-api.com/api/dynamic-url/view
Authentication Learn how to get your API Key and use it in your requests!
{ "url": "Your Dynamic URL"}
curl --location --request GET 'https://api.cookie-api.com/api/dynamic-url/view' \--header 'Authorization: API Key' \--data '{ "url": "https://api.cookie-api.com/s/zs4MKEAyy1zU5NGUf6xeakbRIGptOR"}'
import requests
url = 'https://api.cookie-api.com/api/dynamic-url/view'headers = { 'Authorization': 'API Key'}data = { 'url': 'https://api.cookie-api.com/s/zs4MKEAyy1zU5NGUf6xeakbRIGptOR'}
response = requests.get(url, headers=headers, json=data)print(response.json())
const fetch = require('node-fetch');
const url = 'https://api.cookie-api.com/api/dynamic-url/view';const headers = { 'Authorization': 'API Key', 'Content-Type': 'application/json'};const data = { url: 'https://api.cookie-api.com/s/zs4MKEAyy1zU5NGUf6xeakbRIGptOR'};
fetch(url, { method: 'GET', headers, body: JSON.stringify(data)}) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));
package main
import ( "bytes" "fmt" "log" "net/http" "encoding/json")
type RequestBody struct { URL string `json:"url"`}
func main() { url := "https://api.cookie-api.com/api/dynamic-url/view" requestBody := RequestBody{ URL: "https://api.cookie-api.com/s/zs4MKEAyy1zU5NGUf6xeakbRIGptOR", }
jsonData, err := json.Marshal(requestBody) if err != nil { log.Fatal(err) }
req, err := http.NewRequest("GET", url, bytes.NewBuffer(jsonData)) if err != nil { log.Fatal(err) }
req.Header.Set("Authorization", "API Key") req.Header.Set("Content-Type", "application/json")
client := &http.Client{} resp, err := client.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)}
const https = require('https');
const data = JSON.stringify({ url: 'https://api.cookie-api.com/s/zs4MKEAyy1zU5NGUf6xeakbRIGptOR'});
const options = { hostname: 'api.cookie-api.com', path: '/api/dynamic-url/view', method: 'GET', headers: { 'Authorization': 'API Key', 'Content-Type': 'application/json', 'Content-Length': data.length }};
const req = https.request(options, res => { let responseData = '';
res.on('data', chunk => { responseData += chunk; });
res.on('end', () => { console.log(JSON.parse(responseData)); });});
req.on('error', error => { console.error(error);});
req.write(data);req.end();
require 'net/http'require 'json'require 'uri'
url = URI.parse('https://api.cookie-api.com/api/dynamic-url/view')request = Net::HTTP::Get.new(url)request['Authorization'] = 'API Key'request['Content-Type'] = 'application/json'request.body = { url: 'https://api.cookie-api.com/s/zs4MKEAyy1zU5NGUf6xeakbRIGptOR'}.to_json
response = Net::HTTP.start(url.hostname, url.port) { |http| http.request(request) }
puts JSON.parse(response.body)
use reqwest::blocking::Client;use reqwest::header::HeaderMap;use serde::{Serialize, Deserialize};use serde_json::Value;
#[derive(Serialize)]struct RequestBody { url: String,}
fn main() { let url = "https://api.cookie-api.com/api/dynamic-url/view"; let request_body = RequestBody { url: "https://api.cookie-api.com/s/zs4MKEAyy1zU5NGUf6xeakbRIGptOR".to_string(), };
let client = Client::new(); let mut headers = HeaderMap::new(); headers.insert("Authorization", "API Key".parse().unwrap()); headers.insert("Content-Type", "application/json".parse().unwrap());
let res = client.get(url) .headers(headers) .json(&request_body) .send() .unwrap();
let body: Value = res.json().unwrap(); println!("{:?}", body);}
Responses
{ "changed": "NO", "created_at": "1727816650", "success": true, "target": "https://docs.cookie-api.com", "url": "https://api.cookie-api.com/s/zs4MKEAyy1zU5NGUf6xeakbRIGptOR"}
Delete a Dynamic URL
Deletes a Dynamic URL
Only the Owner’s requests will be applied. Requests from non-owners will be ignored.
DELETE /api/dynamic-url/delete
https://api.cookie-api.com/api/dynamic-url/delete
Authentication Learn how to get your API Key and use it in your requests!
{ "url": "Your Dynamic URL"}
curl --location --request DELETE 'https://api.cookie-api.com/api/dynamic-url/delete' \--header 'Authorization: API Key' \--data '{ "url": "https://api.cookie-api.com/s/zs4MKEAyy1zU5NGUf6xeakbRIGptOR"}'
import requests
url = 'https://api.cookie-api.com/api/dynamic-url/delete'headers = { 'Authorization': 'API Key'}data = { 'url': 'https://api.cookie-api.com/s/zs4MKEAyy1zU5NGUf6xeakbRIGptOR'}
response = requests.delete(url, headers=headers, json=data)print(response.json())
const fetch = require('node-fetch');
const url = 'https://api.cookie-api.com/api/dynamic-url/delete';const headers = { 'Authorization': 'API Key', 'Content-Type': 'application/json'};const data = { url: 'https://api.cookie-api.com/s/zs4MKEAyy1zU5NGUf6xeakbRIGptOR'};
fetch(url, { method: 'DELETE', headers, body: JSON.stringify(data)}) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));
package main
import ( "bytes" "fmt" "log" "net/http" "encoding/json")
type RequestBody struct { URL string `json:"url"`}
func main() { url := "https://api.cookie-api.com/api/dynamic-url/delete" requestBody := RequestBody{ URL: "https://api.cookie-api.com/s/zs4MKEAyy1zU5NGUf6xeakbRIGptOR", }
jsonData, err := json.Marshal(requestBody) if err != nil { log.Fatal(err) }
req, err := http.NewRequest("DELETE", url, bytes.NewBuffer(jsonData)) if err != nil { log.Fatal(err) }
req.Header.Set("Authorization", "API Key") req.Header.Set("Content-Type", "application/json")
client := &http.Client{} resp, err := client.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)}
const https = require('https');
const data = JSON.stringify({ url: 'https://api.cookie-api.com/s/zs4MKEAyy1zU5NGUf6xeakbRIGptOR'});
const options = { hostname: 'api.cookie-api.com', path: '/api/dynamic-url/delete', method: 'DELETE', headers: { 'Authorization': 'API Key', 'Content-Type': 'application/json', 'Content-Length': data.length }};
const req = https.request(options, res => { let responseData = '';
res.on('data', chunk => { responseData += chunk; });
res.on('end', () => { console.log(JSON.parse(responseData)); });});
req.on('error', error => { console.error(error);});
req.write(data);req.end();
require 'net/http'require 'json'require 'uri'
url = URI.parse('https://api.cookie-api.com/api/dynamic-url/delete')request = Net::HTTP::Delete.new(url)request['Authorization'] = 'API Key'request['Content-Type'] = 'application/json'request.body = { url: 'https://api.cookie-api.com/s/zs4MKEAyy1zU5NGUf6xeakbRIGptOR'}.to_json
response = Net::HTTP.start(url.hostname, url.port) { |http| http.request(request) }
puts JSON.parse(response.body)
use reqwest::blocking::Client;use reqwest::header::HeaderMap;use serde::{Serialize, Deserialize};use serde_json::Value;
#[derive(Serialize)]struct RequestBody { url: String,}
fn main() { let url = "https://api.cookie-api.com/api/dynamic-url/delete"; let request_body = RequestBody { url: "https://api.cookie-api.com/s/zs4MKEAyy1zU5NGUf6xeakbRIGptOR".to_string(), };
let client = Client::new(); let mut headers = HeaderMap::new(); headers.insert("Authorization", "API Key".parse().unwrap()); headers.insert("Content-Type", "application/json".parse().unwrap());
let res = client.delete(url) .headers(headers) .json(&request_body) .send() .unwrap();
let body: Value = res.json().unwrap(); println!("{:?}", body);}
Responses
{ "message": "Dynamic URL was deleted.", "success": true}