Create a draft, never send
Requires Draft mode and a unique request identifier. Research availability depends on plan and configured integrations.
curl -X POST "https://app.nudgeforme.com/api/v1/drafts" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: example_string" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"organizationId": "example_string",
"threadId": "example_string",
"requestId": "example_string",
"research": true
}'
import requests
import json
url = "https://app.nudgeforme.com/api/v1/drafts"
headers = {
"Content-Type": "application/json",
"Idempotency-Key": "example_string",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"organizationId": "example_string",
"threadId": "example_string",
"requestId": "example_string",
"research": true
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://app.nudgeforme.com/api/v1/drafts", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "example_string",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"organizationId": "example_string",
"threadId": "example_string",
"requestId": "example_string",
"research": true
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"organizationId": "example_string",
"threadId": "example_string",
"requestId": "example_string",
"research": true
}`)
req, err := http.NewRequest("POST", "https://app.nudgeforme.com/api/v1/drafts", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Idempotency-Key", "example_string")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://app.nudgeforme.com/api/v1/drafts')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Idempotency-Key'] = 'example_string'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"organizationId": "example_string",
"threadId": "example_string",
"requestId": "example_string",
"research": true
}'
response = http.request(request)
puts response.body
{}
{
"error": "Conflict",
"message": "The request conflicts with the current state of the resource",
"code": 409,
"details": "Resource already exists"
}
/drafts
Target server for requests. Edit to use your own host.
Nudge developer API key (REST only) or OAuth access token.
The media type of the request body
Required unless requestId is included in body (8–100 allowed characters).
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. Nudge developer API key (REST only) or OAuth access token.
Headers
Required unless requestId is included in body (8–100 allowed characters).
Responses
Operation result; structure depends on the endpoint.