Home

Invoke a function

Invokes a function

Invokes a Supabase Function.

  • Requires an Authorization header.
  • Invoke params generally match the Fetch API spec.
Parameters
  • functionName
    REQUIRED
    string

    The name of the Function to invoke.

  • options
    Optional
    FunctionInvokeOptions

    Options for invoking the Function.


const { data, error } = await supabase.functions.invoke('hello', {
  body: JSON.stringify({ foo: 'bar' })
})