Skip to content
merran
GitHubInstall

Merran documentation API & integrations

Share something to Merran

POST
/api/share
curl --request POST \
--url http://localhost:3000/api/share \
--header 'Content-Type: multipart/form-data' \
--cookie merran.session_token=<merran.session_token> \
--form title=example \
--form text=example \
--form url=example \
--form file=@file

What Android’s share sheet and the iPhone Shortcut send. A link to a recipe, as text, a form, JSON, or a file with the link in it (a text file, a .webloc, or the web page itself), is added as a recipe; several links start an import in the background. Without a link, photos, a PDF or text are read by AI: a receipt waits to be looked over for the pantry (GET /pantry/receipts/{receiptId}), and a recipe (up to 4 photos, as one) is added, when the household has AI for receipts and importing. It answers with what happened, in words a Shortcut can show, rather than an error when the link couldn’t be added. With an API key, it needs the imports: write permission.

object
title
string
text
string
url
string
file

What was shared, as a file: a text file with the link, a .webloc, the web page, or a photo of a recipe. Several photos come as several file fields.

string format: binary

Already there, or not added.

Media typeapplication/json
object
outcome
required

Added; already in the library (this is that recipe); several links, now importing in the background; a receipt, read and waiting for a look before it goes in the pantry; or not added.

string
Allowed values: added already importing receipt failed
code
required

Why it wasn’t added, for programs: “no_recipe”, “no_recipe_data”, “ai_noKey” and the like.

string | null
message
required

What happened, in words to show, as a Shortcut does.

string
recipe
required
object
id
required
string
slug
required
string
name
required
string
receiptId
required

A receipt: the one to look over, at /pantry/receipts/{receiptId}.

string | null
importId
required

Several links: the import, to follow at /recipes/import/links/{importId}.

string | null
url
required

The recipe’s page, or the import’s.

string | null

Example

{
"outcome": "added",
"code": null,
"message": "Added Lemon Chicken to Merran.",
"recipe": {
"id": "0199e8b0-5a10-7a01-8b00-000000000006",
"slug": "lemon-chicken",
"name": "Lemon Chicken"
},
"importId": null,
"receiptId": null,
"url": "https://merran.example.com/recipes/lemon-chicken"
}

Added.

Media typeapplication/json
object
outcome
required

Added; already in the library (this is that recipe); several links, now importing in the background; a receipt, read and waiting for a look before it goes in the pantry; or not added.

string
Allowed values: added already importing receipt failed
code
required

Why it wasn’t added, for programs: “no_recipe”, “no_recipe_data”, “ai_noKey” and the like.

string | null
message
required

What happened, in words to show, as a Shortcut does.

string
recipe
required
object
id
required
string
slug
required
string
name
required
string
receiptId
required

A receipt: the one to look over, at /pantry/receipts/{receiptId}.

string | null
importId
required

Several links: the import, to follow at /recipes/import/links/{importId}.

string | null
url
required

The recipe’s page, or the import’s.

string | null

Example

{
"outcome": "added",
"code": null,
"message": "Added Lemon Chicken to Merran.",
"recipe": {
"id": "0199e8b0-5a10-7a01-8b00-000000000006",
"slug": "lemon-chicken",
"name": "Lemon Chicken"
},
"importId": null,
"receiptId": null,
"url": "https://merran.example.com/recipes/lemon-chicken"
}

Several links, importing.

Media typeapplication/json
object
outcome
required

Added; already in the library (this is that recipe); several links, now importing in the background; a receipt, read and waiting for a look before it goes in the pantry; or not added.

string
Allowed values: added already importing receipt failed
code
required

Why it wasn’t added, for programs: “no_recipe”, “no_recipe_data”, “ai_noKey” and the like.

string | null
message
required

What happened, in words to show, as a Shortcut does.

string
recipe
required
object
id
required
string
slug
required
string
name
required
string
receiptId
required

A receipt: the one to look over, at /pantry/receipts/{receiptId}.

string | null
importId
required

Several links: the import, to follow at /recipes/import/links/{importId}.

string | null
url
required

The recipe’s page, or the import’s.

string | null

Example

{
"outcome": "added",
"code": null,
"message": "Added Lemon Chicken to Merran.",
"recipe": {
"id": "0199e8b0-5a10-7a01-8b00-000000000006",
"slug": "lemon-chicken",
"name": "Lemon Chicken"
},
"importId": null,
"receiptId": null,
"url": "https://merran.example.com/recipes/lemon-chicken"
}

Not signed in.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
fields
object
key
additional properties
string

Example

{
"error": {
"code": "not_found",
"message": "There's nothing here.",
"fields": {
"name": "Give it a name."
}
}
}

Not allowed.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
fields
object
key
additional properties
string

Example

{
"error": {
"code": "not_found",
"message": "There's nothing here.",
"fields": {
"name": "Give it a name."
}
}
}

Too big to share.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
fields
object
key
additional properties
string

Example

{
"error": {
"code": "not_found",
"message": "There's nothing here.",
"fields": {
"name": "Give it a name."
}
}
}

© 2026 Kyle Johnson. Documentation: CC BY 4.0. Merran: AGPL-3.0-or-later.