Add method
truto integrations add-method adds one method to an existing integration. Give it the HTTP verb and path (or paste a curl example); the CLI merges them into config.resources and PATCHes the integration. No LLM calls, no doc crawl.
Building a whole integration from docs instead? Use AI-powered build.
Quick start
# 1. Preview the merged config first (reads the integration, writes nothing)
truto integrations add-method hubspot contacts archive \
--http-method POST \
--path /crm/v3/objects/contacts/{{query.contact_id}}/archive \
--print
# 2. Looks right? Drop --print to PATCH it for real
truto integrations add-method hubspot contacts archive \
--http-method POST \
--path /crm/v3/objects/contacts/{{query.contact_id}}/archivePrefer a file to eyeball? Use --out patched.json instead of --print.
Build the command
truto integrations add-method <slug-or-id> <resource> <method-name> \
--http-method <verb> \
--path <path-template>slug-or-id: the integration's slug (e.g.hubspot) or UUID.resource: e.g.contacts. Created empty if missing, unless--no-create-resource.method-name: e.g.list,get,archive. Won't overwrite an existing method unless--force.--path: use{{id}}forget/update/delete. Other methods take the id as{{query.<name>}}.
From curl
Paste a curl command and skip the flags. The CLI pulls the verb, path, and body out of it.
truto integrations add-method acme-crm contacts create \
--from-curl 'curl -X POST "https://api.acme.test/v1/contacts" \
-H "Authorization: Bearer $TOKEN" \
-d "{\"name\":\"jane\"}"' \
--print-X/--requestsets the verb. Otherwise data (-d,--data*,--json) makes it POST,-Tmakes it PUT, and no data makes it GET.-F name=@filebecomes a multipart upload;-T fileor--data-binary @filebecomes a raw one.- Other headers are ignored. Auth lives on the integration, not per method.
- A flag you also pass overrides what curl gave. Use
--pathto swap a sample id from the docs for{{query.<name>}}.
A path placeholder written as {id}, :id or <id> is refused. Use {{id}} or {{query.<name>}} instead.
A sample record id from the docs, such as /contacts/12345, only gets a warning. Swap it out with --path.
Flags
| Flag | What it does |
|---|---|
--http-method |
GET, POST, PUT, PATCH or DELETE (any case) |
--path |
Upstream path template |
--from-curl |
Parse verb, path, and body from pasted curl text |
--response-path |
JSONata path to unwrap list/object responses (e.g. results) |
--pagination |
cursor, offset, page or none. Writes placeholder keys (next_cursor, offset, page, limit); set the vendor's names in config.resources.<resource>.<method>.pagination. |
--body / --body-file / --body-format |
Default request body for the method |
--force |
Replace an existing method with the same name |
--no-create-resource |
Fail if the resource doesn't exist |
--print |
Print the merged config instead of PATCHing |
--out |
Save the merged config to a file instead of PATCHing |
See every flag: truto integrations add-method --help
Exit codes
After the PATCH, the command re-reads the integration to confirm the write landed.
| Exit | Meaning |
|---|---|
| 0 | Written. |
| 1 | Bad input (unknown verb, missing --path, integration not found, method exists without --force, missing resource with --no-create-resource) or a blocking audit ERROR: nothing was written. Also authentication or an unexpected failure, which can come after the method landed: check truto integrations get <id> before retrying. |
| 2 | Written, but not live as sent, or the re-read itself failed. |
| 3 | Not written: held, stale version, rejected, or no effect. Check truto integrations get <id> before retrying. |
--print and --out leave out plaintext credential secrets. To reuse a saved file with truto integrations update --body-file, put every left-out secret back. That command refuses a config still missing one.
What else it checks
- Runs the same audit as
apply. Only a new ERROR, or one on the method you touched, blocks the write. Pass--allow-audit-errorsto push anyway. - Refuses a write that would lose a stored credential secret, the same way
truto integrations updatedoes. - Writes no documentation rows, except a
body_schemarow marking a--from-curlfile field as binary. Until the method has adescriptionrow it is not offered as an MCP tool andtruto accounts toolsdoesn't list it. Generate its rows withtruto integrations build <docs-url> --docs-only <slug> --resource <resource>, thentruto integrations apply <slug>.docs.integration.json --docs-only.
Next
See Managing integrations to list, get and update integrations, or AI-powered build to build a full integration from docs.