API Keys
Mint an API key
Dashboard session only. The plaintext key is returned once in this response and never again — store it securely. Optional profileId pins the key to a single profile; cross-profile reads/writes 404 under that key.
POST
/
v1
/
api-keys
Mint an API key
curl --request POST \
--url https://api.letmepost.dev/v1/api-keys \
--header 'Content-Type: application/json' \
--data '
{
"name": "ci-publish-key",
"prefix": "lmp_live_",
"scopes": []
}
'import requests
url = "https://api.letmepost.dev/v1/api-keys"
payload = {
"name": "ci-publish-key",
"prefix": "lmp_live_",
"scopes": []
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: 'ci-publish-key', prefix: 'lmp_live_', scopes: []})
};
fetch('https://api.letmepost.dev/v1/api-keys', 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.letmepost.dev/v1/api-keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'ci-publish-key',
'prefix' => 'lmp_live_',
'scopes' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.letmepost.dev/v1/api-keys"
payload := strings.NewReader("{\n \"name\": \"ci-publish-key\",\n \"prefix\": \"lmp_live_\",\n \"scopes\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
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.letmepost.dev/v1/api-keys")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"ci-publish-key\",\n \"prefix\": \"lmp_live_\",\n \"scopes\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.letmepost.dev/v1/api-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"ci-publish-key\",\n \"prefix\": \"lmp_live_\",\n \"scopes\": []\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"prefix": "<string>",
"last4": "<string>",
"scopes": [
"<string>"
],
"key": "lmp_live_AbC123…",
"createdAt": "2023-11-07T05:31:56Z",
"profileId": "<string>"
}{
"error": {
"code": "preflight_failed",
"message": "Bluesky posts are capped at 300 graphemes; this body is 312.",
"rule": "bluesky.text.max_graphemes",
"platform": "bluesky",
"remediation": "Trim 12 graphemes, or split into a thread.",
"docUrl": "https://docs.letmepost.dev/errors/preflight_failed",
"ruleUrl": "https://docs.letmepost.dev/preflight/bluesky-text-max_graphemes",
"requestId": "req_01HY6X4AWBJM2K9F2PTQMRD9JQ"
}
}{
"error": {
"code": "preflight_failed",
"message": "Bluesky posts are capped at 300 graphemes; this body is 312.",
"rule": "bluesky.text.max_graphemes",
"platform": "bluesky",
"remediation": "Trim 12 graphemes, or split into a thread.",
"docUrl": "https://docs.letmepost.dev/errors/preflight_failed",
"ruleUrl": "https://docs.letmepost.dev/preflight/bluesky-text-max_graphemes",
"requestId": "req_01HY6X4AWBJM2K9F2PTQMRD9JQ"
}
}{
"error": {
"code": "preflight_failed",
"message": "Bluesky posts are capped at 300 graphemes; this body is 312.",
"rule": "bluesky.text.max_graphemes",
"platform": "bluesky",
"remediation": "Trim 12 graphemes, or split into a thread.",
"docUrl": "https://docs.letmepost.dev/errors/preflight_failed",
"ruleUrl": "https://docs.letmepost.dev/preflight/bluesky-text-max_graphemes",
"requestId": "req_01HY6X4AWBJM2K9F2PTQMRD9JQ"
}
}{
"error": {
"code": "preflight_failed",
"message": "Bluesky posts are capped at 300 graphemes; this body is 312.",
"rule": "bluesky.text.max_graphemes",
"platform": "bluesky",
"remediation": "Trim 12 graphemes, or split into a thread.",
"docUrl": "https://docs.letmepost.dev/errors/preflight_failed",
"ruleUrl": "https://docs.letmepost.dev/preflight/bluesky-text-max_graphemes",
"requestId": "req_01HY6X4AWBJM2K9F2PTQMRD9JQ"
}
}{
"error": {
"code": "preflight_failed",
"message": "Bluesky posts are capped at 300 graphemes; this body is 312.",
"rule": "bluesky.text.max_graphemes",
"platform": "bluesky",
"remediation": "Trim 12 graphemes, or split into a thread.",
"docUrl": "https://docs.letmepost.dev/errors/preflight_failed",
"ruleUrl": "https://docs.letmepost.dev/preflight/bluesky-text-max_graphemes",
"requestId": "req_01HY6X4AWBJM2K9F2PTQMRD9JQ"
}
}{
"error": {
"code": "preflight_failed",
"message": "Bluesky posts are capped at 300 graphemes; this body is 312.",
"rule": "bluesky.text.max_graphemes",
"platform": "bluesky",
"remediation": "Trim 12 graphemes, or split into a thread.",
"docUrl": "https://docs.letmepost.dev/errors/preflight_failed",
"ruleUrl": "https://docs.letmepost.dev/preflight/bluesky-text-max_graphemes",
"requestId": "req_01HY6X4AWBJM2K9F2PTQMRD9JQ"
}
}Headers
Recommended on every write. Replays within 24 hours return the original response; conflicting bodies surface as 409 idempotency_conflict. See Idempotency.
Required string length:
1 - 128Example:
"post-launch-2026-05-15-001"
Body
application/json
Required string length:
1 - 100Example:
"ci-publish-key"
Available options:
lmp_live_, lmp_test_ Optional profile scope. When set, the key only authenticates requests targeting that profile; cross-profile reads/writes 404.
Response
Key minted — plaintext shown once.
Was this page helpful?
⌘I
Mint an API key
curl --request POST \
--url https://api.letmepost.dev/v1/api-keys \
--header 'Content-Type: application/json' \
--data '
{
"name": "ci-publish-key",
"prefix": "lmp_live_",
"scopes": []
}
'import requests
url = "https://api.letmepost.dev/v1/api-keys"
payload = {
"name": "ci-publish-key",
"prefix": "lmp_live_",
"scopes": []
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: 'ci-publish-key', prefix: 'lmp_live_', scopes: []})
};
fetch('https://api.letmepost.dev/v1/api-keys', 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.letmepost.dev/v1/api-keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'ci-publish-key',
'prefix' => 'lmp_live_',
'scopes' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.letmepost.dev/v1/api-keys"
payload := strings.NewReader("{\n \"name\": \"ci-publish-key\",\n \"prefix\": \"lmp_live_\",\n \"scopes\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
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.letmepost.dev/v1/api-keys")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"ci-publish-key\",\n \"prefix\": \"lmp_live_\",\n \"scopes\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.letmepost.dev/v1/api-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"ci-publish-key\",\n \"prefix\": \"lmp_live_\",\n \"scopes\": []\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"prefix": "<string>",
"last4": "<string>",
"scopes": [
"<string>"
],
"key": "lmp_live_AbC123…",
"createdAt": "2023-11-07T05:31:56Z",
"profileId": "<string>"
}{
"error": {
"code": "preflight_failed",
"message": "Bluesky posts are capped at 300 graphemes; this body is 312.",
"rule": "bluesky.text.max_graphemes",
"platform": "bluesky",
"remediation": "Trim 12 graphemes, or split into a thread.",
"docUrl": "https://docs.letmepost.dev/errors/preflight_failed",
"ruleUrl": "https://docs.letmepost.dev/preflight/bluesky-text-max_graphemes",
"requestId": "req_01HY6X4AWBJM2K9F2PTQMRD9JQ"
}
}{
"error": {
"code": "preflight_failed",
"message": "Bluesky posts are capped at 300 graphemes; this body is 312.",
"rule": "bluesky.text.max_graphemes",
"platform": "bluesky",
"remediation": "Trim 12 graphemes, or split into a thread.",
"docUrl": "https://docs.letmepost.dev/errors/preflight_failed",
"ruleUrl": "https://docs.letmepost.dev/preflight/bluesky-text-max_graphemes",
"requestId": "req_01HY6X4AWBJM2K9F2PTQMRD9JQ"
}
}{
"error": {
"code": "preflight_failed",
"message": "Bluesky posts are capped at 300 graphemes; this body is 312.",
"rule": "bluesky.text.max_graphemes",
"platform": "bluesky",
"remediation": "Trim 12 graphemes, or split into a thread.",
"docUrl": "https://docs.letmepost.dev/errors/preflight_failed",
"ruleUrl": "https://docs.letmepost.dev/preflight/bluesky-text-max_graphemes",
"requestId": "req_01HY6X4AWBJM2K9F2PTQMRD9JQ"
}
}{
"error": {
"code": "preflight_failed",
"message": "Bluesky posts are capped at 300 graphemes; this body is 312.",
"rule": "bluesky.text.max_graphemes",
"platform": "bluesky",
"remediation": "Trim 12 graphemes, or split into a thread.",
"docUrl": "https://docs.letmepost.dev/errors/preflight_failed",
"ruleUrl": "https://docs.letmepost.dev/preflight/bluesky-text-max_graphemes",
"requestId": "req_01HY6X4AWBJM2K9F2PTQMRD9JQ"
}
}{
"error": {
"code": "preflight_failed",
"message": "Bluesky posts are capped at 300 graphemes; this body is 312.",
"rule": "bluesky.text.max_graphemes",
"platform": "bluesky",
"remediation": "Trim 12 graphemes, or split into a thread.",
"docUrl": "https://docs.letmepost.dev/errors/preflight_failed",
"ruleUrl": "https://docs.letmepost.dev/preflight/bluesky-text-max_graphemes",
"requestId": "req_01HY6X4AWBJM2K9F2PTQMRD9JQ"
}
}{
"error": {
"code": "preflight_failed",
"message": "Bluesky posts are capped at 300 graphemes; this body is 312.",
"rule": "bluesky.text.max_graphemes",
"platform": "bluesky",
"remediation": "Trim 12 graphemes, or split into a thread.",
"docUrl": "https://docs.letmepost.dev/errors/preflight_failed",
"ruleUrl": "https://docs.letmepost.dev/preflight/bluesky-text-max_graphemes",
"requestId": "req_01HY6X4AWBJM2K9F2PTQMRD9JQ"
}
}
