Fetch Entity by Foreign ID
Entity Endpoints
Fetch Entity by Foreign ID
Get an entity by its foreign ID, optionally creating it if not found
GET
Fetch Entity by Foreign ID
Returns an entity matching the givenDocumentation Index
Fetch the complete documentation index at: https://docs.replyke.com/llms.txt
Use this file to discover all available pages before exploring further.
foreignId within the project. Optionally creates a blank entity if none exists — useful for automatically bootstrapping entities when a user first visits a page or URL in your application.
Query Parameters
The foreign ID to look up. This is the identifier from your application (URL, slug, database ID, etc.).
When
"true", creates a blank entity with this foreignId if no entity is found. The new entity has no title, content, or user attribution. Defaults to "false".Comma-separated list of associations to include:
user— the author’s user profilespace— the space the entity belongs totopComment— the highest-voted commentsaved— whether the authenticated user has saved this entityfiles— uploaded file/image attachments
Response
Returns an Entity object.This endpoint returns entities regardless of moderation status, so the client can display the appropriate moderation state. Draft entities are only returned to their author (or with a service/master key).
Error Responses
Not Found — 404
Not Found — 404
foreignId exists and createIfNotFound is not "true".
