Receive a Clerk account event
curl --request POST \
--url https://api.agentsfleet.net/v1/auth/identity-events/clerk \
--header 'Content-Type: application/json' \
--header 'svix-id: <svix-id>' \
--header 'svix-signature: <svix-signature>' \
--header 'svix-timestamp: <svix-timestamp>'import requests
url = "https://api.agentsfleet.net/v1/auth/identity-events/clerk"
headers = {
"svix-id": "<svix-id>",
"svix-timestamp": "<svix-timestamp>",
"svix-signature": "<svix-signature>",
"Content-Type": "application/json"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'svix-id': '<svix-id>',
'svix-timestamp': '<svix-timestamp>',
'svix-signature': '<svix-signature>',
'Content-Type': 'application/json'
}
};
fetch('https://api.agentsfleet.net/v1/auth/identity-events/clerk', 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.agentsfleet.net/v1/auth/identity-events/clerk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"svix-id: <svix-id>",
"svix-signature: <svix-signature>",
"svix-timestamp: <svix-timestamp>"
],
]);
$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.agentsfleet.net/v1/auth/identity-events/clerk"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("svix-id", "<svix-id>")
req.Header.Add("svix-timestamp", "<svix-timestamp>")
req.Header.Add("svix-signature", "<svix-signature>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.agentsfleet.net/v1/auth/identity-events/clerk")
.header("svix-id", "<svix-id>")
.header("svix-timestamp", "<svix-timestamp>")
.header("svix-signature", "<svix-signature>")
.header("Content-Type", "application/json")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentsfleet.net/v1/auth/identity-events/clerk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["svix-id"] = '<svix-id>'
request["svix-timestamp"] = '<svix-timestamp>'
request["svix-signature"] = '<svix-signature>'
request["Content-Type"] = 'application/json'
response = http.request(request)
puts response.read_body{
"created": true,
"workspace_id": "<string>",
"workspace_name": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}Authentication
Receive a Clerk account event
Receives signed account events from Clerk. A user.created event creates the user’s account and default workspace. Repeated events return created:false. Unsupported event types return 200 with status: ignored.
POST
/
v1
/
auth
/
identity-events
/
clerk
Receive a Clerk account event
curl --request POST \
--url https://api.agentsfleet.net/v1/auth/identity-events/clerk \
--header 'Content-Type: application/json' \
--header 'svix-id: <svix-id>' \
--header 'svix-signature: <svix-signature>' \
--header 'svix-timestamp: <svix-timestamp>'import requests
url = "https://api.agentsfleet.net/v1/auth/identity-events/clerk"
headers = {
"svix-id": "<svix-id>",
"svix-timestamp": "<svix-timestamp>",
"svix-signature": "<svix-signature>",
"Content-Type": "application/json"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'svix-id': '<svix-id>',
'svix-timestamp': '<svix-timestamp>',
'svix-signature': '<svix-signature>',
'Content-Type': 'application/json'
}
};
fetch('https://api.agentsfleet.net/v1/auth/identity-events/clerk', 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.agentsfleet.net/v1/auth/identity-events/clerk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"svix-id: <svix-id>",
"svix-signature: <svix-signature>",
"svix-timestamp: <svix-timestamp>"
],
]);
$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.agentsfleet.net/v1/auth/identity-events/clerk"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("svix-id", "<svix-id>")
req.Header.Add("svix-timestamp", "<svix-timestamp>")
req.Header.Add("svix-signature", "<svix-signature>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.agentsfleet.net/v1/auth/identity-events/clerk")
.header("svix-id", "<svix-id>")
.header("svix-timestamp", "<svix-timestamp>")
.header("svix-signature", "<svix-signature>")
.header("Content-Type", "application/json")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentsfleet.net/v1/auth/identity-events/clerk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["svix-id"] = '<svix-id>'
request["svix-timestamp"] = '<svix-timestamp>'
request["svix-signature"] = '<svix-signature>'
request["Content-Type"] = 'application/json'
response = http.request(request)
puts response.read_body{
"created": true,
"workspace_id": "<string>",
"workspace_name": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}Headers
Svix message identifier (used for deduplication and signature binding).
Unix timestamp of the Svix delivery (used for replay protection).
Space-separated list of Svix v1 signatures.
Response
The account the event opened or found, or a delivery not acted on
- Option 1
- Option 2
What POST /v1/auth/identity-events/clerk answers with a 200.
An event that opened or found an account names it; one that changes nothing says why.